mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
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:
co-authored by
akshathayadav378-boop
parent
f795aa3232
commit
b2c22ccec6
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user