Skip to content

SD-2541 - fix: avoid scrolling back when dragging selection#2809

Open
chittolinag wants to merge 3 commits intomainfrom
gabriel/sd-2541-bug-selection-bounces-when-drag-selecting-past-viewport-edge
Open

SD-2541 - fix: avoid scrolling back when dragging selection#2809
chittolinag wants to merge 3 commits intomainfrom
gabriel/sd-2541-bug-selection-bounces-when-drag-selecting-past-viewport-edge

Conversation

@chittolinag
Copy link
Copy Markdown
Contributor

Issue

Drag-selecting past the viewport edge made the page bounce instead of extending the selection because edge auto-scroll and “scroll selection into view” on every selectionUpdate both moved the scroll container at once.

Proposed solution

While the pointer is dragging text, skip setting and applying the selection scroll-into-view flag so only edge auto-scroll runs; on pointer up, call a small notifyDragSelectionEnded hook once so the editor can scroll the selection into view after auto-scroll stops. Keyboard selection (e.g. Shift + arrows) is unchanged.

@linear
Copy link
Copy Markdown

linear bot commented Apr 14, 2026

@chittolinag chittolinag marked this pull request as ready for review April 14, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants