Files
openidea/src/ui/pointerDrag.module.css
T
akshathayadav378-boopandakshathayadav378-boop b2c22ccec6 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>
2026-11-14 21:24:20 +08:00

27 lines
632 B
CSS

.ghost {
position: fixed;
z-index: var(--z-tooltip);
margin: 0;
opacity: 0.85;
pointer-events: none;
box-shadow: var(--shadow-tooltip);
background: var(--bg-popup);
}
.noTarget {
opacity: 0.5;
}
.dragging,
.dragging * {
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;
}