Skip to content

Commit eb806ff

Browse files
bloveclaude
andcommitted
fix(ui): stop native text selection from eating the marquee drag
CI's WebKit (Linux) failed the marquee range-drag e2e while Chromium passed. A trace screenshot showed the browser's own blue text-highlight running across exactly the dragged cells — WebKit starts its native text-selection gesture on the same pointer drag and consumes it, so the range never grows past the anchor. Cell content is copied through the grid's own Cmd/Ctrl+C range copy, never native OS text selection, so making cells non-selectable costs nothing intended. Not reproducible on macOS WebKit: the local build passes with and without this change, so CI is the only environment that exercises it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent a6446d9 commit eb806ff

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎packages/ui/src/grid.css‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@
134134
<span style="min-width:0; overflow:hidden; text-overflow:ellipsis">
135135
via a column's `render`. */
136136
overflow: hidden;
137+
/* A marquee cell-range drag (pointerdown -> move -> up, see
138+
pretable-surface.tsx) drags the pointer straight across this cell's own
139+
text. Without this, WebKit starts its native text-selection gesture on
140+
that same drag — confirmed from a CI trace screenshot showing the
141+
browser's blue text-highlight running across exactly the dragged cells
142+
— and that native gesture appears to consume the drag instead of the
143+
marquee logic, which is why the selected range never grew past the
144+
anchor cell in WebKit specifically (Chromium does not initiate text
145+
selection here, for reasons that come down to its own heuristics, not
146+
anything this codebase controls). Cell content is copied through the
147+
grid's own Cmd/Ctrl+C range copy, never native OS text selection, so
148+
losing native selectability here costs nothing intended. */
149+
user-select: none;
137150
}
138151

139152
:where([data-pretable-cell]:last-of-type) {

0 commit comments

Comments
 (0)