Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gesture disambiguation fix #7

Closed
wants to merge 4 commits into from
Closed

gesture disambiguation fix #7

wants to merge 4 commits into from

Conversation

theSharpestTool
Copy link

fix #4 #1

@shinriyo
Copy link

shinriyo commented Nov 8, 2020

@PiN73 hello

@bot509
Copy link

bot509 commented Jan 8, 2021

@theSharpestTool
you reformatted the source file with your own format configuration,
this makes difficult to review and sync flutter source files next time.
can you pull a new request and make it easy to merge? thx

@theSharpestTool
Copy link
Author

@ultronnet @PiN73 please check, it is updated

@PiN73
Copy link
Owner

PiN73 commented Jan 25, 2021

@theSharpestTool thank you for disambiguation solution and for the update!

I'm going to merge and add make some changes to allow keeping old behavior or combining them

Copy link
Owner

@PiN73 PiN73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[deleted]

@@ -636,7 +636,7 @@ class _CupertinoBackGestureController<T> {
@required this.controller,
}) : assert(navigator != null),
assert(controller != null) {
navigator.didStartUserGesture();
//navigator.didStartUserGesture();
Copy link
Owner

@PiN73 PiN73 Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify which use-case do you have with keyboard which needs this fix?

Copy link
Author

@theSharpestTool theSharpestTool Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PiN73 If there are two pages with autofocused text in each. If the user navigates back from one page to another by swiping back, the field will lose autofocus. It was critical in my project

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't disable these callbacks as it can break other things. If you want to allow focusing during user gesture, I think it would be better to patch _shouldIgnoreFocusRequest in widgets/routes.dart making it always return false whatever the value of userGestureInProgress is

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As widgets/routes.dart isn't a part of this package, I'm going to keep the original behavior

Copy link
Author

@theSharpestTool theSharpestTool Jan 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't disable these callbacks as it can break other things. If you want to allow focusing during user gesture, I think it would be better to patch _shouldIgnoreFocusRequest in widgets/routes.dart making it always return false whatever the value of userGestureInProgress is

What things it can break?

@alvazu
Copy link

alvazu commented Dec 13, 2021

@theSharpestTool what if I still want the swipe gesture enabled at the first page of tabview?

flutter: Gesture arena 140 ❙ ★ Opening new gesture arena.
flutter: Gesture arena 140 ❙ Adding: HorizontalDragGestureRecognizer#da3a5(start behavior: start)
flutter: Gesture arena 140 ❙ Adding: VerticalDragGestureRecognizer#877a6(start behavior: start)
flutter: Gesture arena 140 ❙ Adding: HorizontalDragGestureRecognizer#04a38(debugOwner: _CupertinoBackGestureDetectorState#03f71, start behavior: start)
flutter: Gesture arena 140 ❙ Closing with 3 members.
flutter: Gesture arena 140 ❙ Accepting: HorizontalDragGestureRecognizer#da3a5(start behavior: start)
flutter: Gesture arena 140 ❙ Self-declared winner: HorizontalDragGestureRecognizer#da3a5(start behavior: start)

In other word, how to control the winner as I want?

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.

how to avoid this plugin's gesture?
5 participants