-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Scrolling with two fingers scrolls twice as fast #11884
Comments
While this is awesome, I suspect this will block AX work and we should remove it. :) |
The scrolling speed increases with the number of fingers on screen. |
I still come across with such problem with 1.9.1 +hotfix4 & 5; |
Still persists (master v1.16.3-pre.56) checked with that simple code
The scrolling speed increases according to the number of fingers on screen. |
Part of: #38926 |
Persists with current master flutter doctor -v
|
I find a workaround for it! :D Please look at this question (answered by myself after digging into flutter source code). Note: Do not worry about that question's title. If you set |
Any solution for the whole app to disable that feature? |
Can we leave something like this in there though? It's a great shibboleth to detect Flutter apps in the wild. |
There are plenty of ways to tell whether or not an app uses Flutter, I'm sure we can fix this one 🙃 |
Like? |
Off the top of my head:
|
Like FlutterHunt I think |
I don't mind this for one-dimensional lists, but this "feature" does bring some issues to pinch-zoom + scroll, which works flawlessly on native iOS but very weirdly in Flutter since the scroll speed is doubled. |
I'm trying to solve this issue, not easy but I found this:
It seems to be a normal behavior, but why ? |
This can be left unsolved(only if this doesn't break things elsewhere). |
@hitiksaini This does break the user experience in a common use case though. How? The issue Medium and higher-end phones do not seem to have this issue with hand palms however this still should be fixed so as to not alienate an entire market. |
@JanFeni I understand your point of view. I haven't got my hands on with low-end phones. Thanks for this information. |
It could become an optional feature tho. Like making a Boolean at the top level say MaterialApp (in case of android) as |
This issues is dramatically affecting to many app that have Tiktok-like vertical video, if user scrolling using 2 finger it will unconditionally move faster so very bad UX |
Hahahaha, so interesting |
This comment was marked as duplicate.
This comment was marked as duplicate.
EDIT: @goderbauer pointed out that iOS actually uses a different algorithm now, which I'll take a stab at implementing. As Android's behavior differs, listening only to the most recent touch, I believe Flutter should do the same when targeting Android. There's definitely something to be said for having consistent behavior across platforms (and this is one of Flutter's strengths), but scrolling feels like such a fundamental part of the UX that I believe it should be tailored to each platform's stock behavior by default. But in the spirit of full customization, (while this runs counter to good UX IMO), if certain developers really want to set a specific behavior across their app regardless of platform, we can expose this as an enum option. Something like this: enum MultiTouchScrollBehavior { platformDefault, average, first, last, sum } Where Whether or not we want to leave existing projects on Thoughts? I'd be willing to try to build this out for proposal if folks are interested. EDIT: PR open here: #138763 |
I tried this in a number of Apple apps on iOS 17 (e.g. the App Store and the Settings app) and wasn't able to see this behavior.
Yes, our goal is to be as close as possible to the "native" behavior to not disrupt a user's muscle memory. |
Wow, would you look at that… I feel like I'm in the twilight zone or something, because I could've sworn that's how it worked. (Perhaps it worked this way in the past? In any case, let's only focus on what current versions do.) In any case, I stand corrected; thanks for pointing that out, @goderbauer. (Unfortunate, too… I was just now opening a PR that included a behavior fix for both iOS and Android, with Android using the last-touch behavior based on @xu-baolin's solution, and iOS using the averaging behavior I thought it had. I'll have to refactor the latter!) Anyway, at a glance, iOS' actual algorithm appears to be more complicated. IMG_2271-480.movAlso key, of course, is that moving two fingers together tracks the fingers' midpoint, which is essentially the averaging behavior I mentioned earlier. You can confirm this by dragging two fingers along the screen, but having one start moving faster than the other one. However, if one of the two moving fingers stops moving, the system reverts to fully tracking the one that's actively moving. Essentially, for iOS, it seems like we need to consider moving fingers as "active" participants, and average their position and motion. But when they're no longer moving (perhaps their motion delta per-frame is below a certain threshold), they're to be considered "inactive", and thus exempt from the averaging. IMG_2273-480.movThere is, however, a baffling quirk… if at any point a finger is lifted, the remaining fingers seem to sometimes be forcefully rendered "inactive" by iOS, and will be entirely ignored for the remainder of their time in contact with the display. But I don't know that we need to worry about nor replicate this level of nuance, as I'm not sure it's even intentional due to its apparent coin-flip nature. If anyone can see a pattern in this behavior, please let me know. It seems to exist to facilitate "fling" scrolling even if the user accidentally has another finger sitting onscreen, but I'm unsure. I'll modify my solution in light of this, sans implementing the quirk for now. |
…36708) Fixes #11884 As #38926 pointed out, the current Flutter implementation of multi-finger drag behavior is different from iOS and Android. This change introduces the `MultitouchDragStrategy` attribute, which implements the Android behavior and can be controlled through `ScrollBehavior`, while retaining the ability to extend iOS behavior in the future.
This comment was marked as off-topic.
This comment was marked as off-topic.
Take a look at the PR - |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
…utter#136708) Fixes flutter#11884 As flutter#38926 pointed out, the current Flutter implementation of multi-finger drag behavior is different from iOS and Android. This change introduces the `MultitouchDragStrategy` attribute, which implements the Android behavior and can be controlled through `ScrollBehavior`, while retaining the ability to extend iOS behavior in the future.
For the sake of making the outcome visible explicitly on this thread: the current solution is that the default behavior on all platforms is that the latest finger controls the scrolling. That's the same as the Android native behavior, as described at #11884 (comment). See #136708 which made the fix, and the docs at: (I figured this was worth clarifying here because the latest discussion above was toward a different option, where we'd also implement the iOS native behavior and make that the default on iOS. That may still happen in the future if there's a desire for it, but it'd be its own issue.) Very happy this is fixed! Thanks @xu-baolin @JacobSyndeo and everyone else who contributed. |
When scrolling a Flutter list with two fingers the list scrolls twice as fast.
In native Android or iOS apps, the list continues to scroll in regular speed even with two fingers.
Note: This is NOT specific to accessibility scrolling with two fingers. It's visible even when accessibility is disabled. However, it's also a problem for accessibility scrolling, where using two fingers are commonly used for scrolling.
The text was updated successfully, but these errors were encountered: