Skip to content

fix: resolve drag-selection jumping issue on desktop#2702

Open
nandin9 wants to merge 1 commit intosingerdmx:masterfrom
nandin9:fix/desktop-drag-selection-jump
Open

fix: resolve drag-selection jumping issue on desktop#2702
nandin9 wants to merge 1 commit intosingerdmx:masterfrom
nandin9:fix/desktop-drag-selection-jump

Conversation

@nandin9
Copy link

@nandin9 nandin9 commented Jan 27, 2026

Description

The Problem:When there are multiple lines of text, dragging to select from top to bottom causes the editor to jump back to the first line of the selection.

The Solution:Wrapped the bringIntoView logic in WidgetsBinding.instance.addPostFrameCallback. This ensures the scroll position is calculated and updated only after the layout is stable and the new caret position is ready.

Related Issues

Fixes #2697, Fixes #1642

Type of Change

  • 🛠️ Bug fix: Resolves an issue without changing current behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text selection extends incorrectly upward during mouse drag on web/desktop Mouse dragging for selection does not allow normal scrolling.

1 participant