Repository navigation
Conversation
Sibling scopes sharing a controller cleared handles on ownership loss but left the adaptive context menu up. Remove this scope's menu without clearing toolbarWanted so the owner can still restore on settle.
Describe surface-bounds gesture starts and empty-click dismiss in plain terms so the package history stays host-agnostic.
Autoscroll scroll notifications were re-presenting the adaptive toolbar mid-expand when toolbarWanted got re-armed (host clamping a range via the public selection setter). Gate scroll / geometry restore on _dragGlobal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two toolbar timing bugs from dogfooding #30 with several per-body scopes on one controller.
When selection moves from document A to B, scope A already cleared its handles but left the adaptive toolbar up. Losing
ownsSelectionChromenow removes that scope's context menu.toolbarWantedstays set so the owning sibling can still restore on settle.Separately, an expand drag near the edge could pop the toolbar before the finger came up. Autoscroll delivers scroll notifications while the drag is live, and the geometry restore path treated
toolbarWantedas permission to show the menu. Hosts that clamp a wandered range back onto the subject via the publicselectionsetter re-armtoolbarWantedmid-gesture, so the menu came back early. Scroll / geometry restore now no-ops while_dragGlobalis set. Drag-endshowToolbaris unchanged.Follow-up for #30.
Test plan
flutter test test/selection/selection_widget_test.dart --name "expand drag keeps toolbar hidden"