kopia lustrzana https://github.com/Tldraw/Tldraw
textfields: only do pointer capture when not editing (#3407)
Fixes https://linear.app/tldraw/issue/TLD-2374/can-lose-focus-and-caret #focus-issues #blood-moat ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't knowlu/frame-kickout-rotation^2
rodzic
4a5068f681
commit
994b0f8baa
|
@ -160,9 +160,11 @@ export function useEditableText(id: TLShapeId, type: string, text: string) {
|
|||
|
||||
// This is important so that when dragging a shape using the text label,
|
||||
// the shape continues to be dragged, even if the cursor is over the UI.
|
||||
setPointerCapture(e.currentTarget, e)
|
||||
if (!isEditing) {
|
||||
setPointerCapture(e.currentTarget, e)
|
||||
}
|
||||
},
|
||||
[editor, id]
|
||||
[editor, id, isEditing]
|
||||
)
|
||||
|
||||
const handleDoubleClick = stopEventPropagation
|
||||
|
|
Ładowanie…
Reference in New Issue