fix(ui): keep a file drag from selecting the text it passes over (#3358)

Dragging a file from the Project view selected the editor text the pointer passed over (#3334). WebKit keeps contenteditable text selectable whatever its user-select, and starts a selection there during a mouse drag even when the press selected nothing. beginDrag() now clears the selection and marks every pointer drag (startPointerDrag, the Project view's own file drag, tool window stripe buttons): no selection, and inputs, textareas and contenteditable out of hit testing (drop targets are their containers).

Co-authored-by: akshathayadav378-boop <287247196+akshathayadav378-boop@users.noreply.github.com>
This commit is contained in:
akshathayadav378-boop
2026-11-14 21:24:20 +08:00
committed by GitHub
co-authored by akshathayadav378-boop
parent f795aa3232
commit b2c22ccec6
6 changed files with 64 additions and 3 deletions
+7
View File
@@ -17,3 +17,10 @@
cursor: grabbing !important;
user-select: none !important;
}
/* WebKit keeps editable text selectable whatever its user-select, so the pointer passing over
the editor or a text field during a drag selected text there (#3334). Take them out of hit
testing; drop targets are their containers. */
.dragging :is(input, textarea, [contenteditable]) {
pointer-events: none !important;
}