-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Momentum scrolling continues despite press and hold in list view (…
…#196) ## Fixes / Closes (optional) Fixes #190. ## Description This PR fixes an incorrect use of the `ScrollActivity.shouldIgnorePointer` flag that has caused the issue. Previously, `DragScrollDrivenSheetActivity` used to start a `SheetContentBallisticScrollActivity` with `shouldIgnorePointer` set to `false` when a drag gesture ended. However, it should actually be `true` except in a special case. This is because setting `ScrollActivity.shouldIgnorePointer` to `true` means that clickable items in the scroll view cannot receive pointer events while performing that activity, and the scroll view may receive them instead. So if the flag is set to `false` during a ballistic scroll animation and there are any clickable items in the scroll view, the scroll view may not be able to receive the pointer events, resulting in the ballistic scroll animation not stopping in response to user gestures. After this PR is merged, `SheetContentBallisticScrollActivity` will be started with the same value of `shouldIgnorePointer` as the previous `ScrollActivity`. Note that we can't use a hardcoded value of `true` here, as it may need to be `false` in a special case where the pointer device kind is `PointerDeviceKind.trackpad`. ## Summary (check all that apply) - [x] Modified / added code - [x] Modified / added tests - [ ] Modified / added examples - [ ] Modified / added others (pubspec.yaml, workflows, etc...) - [ ] Updated README - [ ] Contains breaking changes - [ ] Created / updated migration guide - [ ] Incremented version number - [ ] Updated CHANGELOG
- Loading branch information
Showing
4 changed files
with
84 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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