GestureConverter: Stop flings with fake fingers
Currently, the only way to stop a fling (the scrolling that occurs due to "momentum" after you've finished a two-finger swipe on the touchpad) is to put two fingers down again and move them slightly. This is an awkward gesture, compared to most platforms where you just touch the pad again and scrolling stops. The trouble is that there is currently no API by which we can tell apps to stop a fling. Instead, make a fake finger at the current cursor location, then immediately cancel it. This stops flings without side effects (e.g. activating UI elements, inking in drawing apps, moving the insertion point in text fields, etc.) in every app I've tried it in [0], except for a number of issues in Google Docs, Sheets, and Slides (both the Android apps and when opened in Chrome). We'll have to talk to the relevant teams about this. Follow-up CLs will make an API change to make it easier to distinguish these fling stops from actual clicks. [0]: Calendar, Chrome [1, 2], Docs, Files, Firefox Beta [1, 2], Gmail, Google, Keep, Maps, News, Photos, Play Store, Podcasts, Settings, Sheets, Slides, Word, YouTube [1]: https://www.longestjokeintheworld.com/ [2]: https://codepen.io/caraya/embed/ZyQMWd Bug: 281106755 Test: start flings in a number of apps [0], touch the touchpad, and check that the fling stops without causing other side effects Change-Id: Ie8504dc047ee23b5524d5372f65adfaa75a76cd8
Loading
Please register or sign in to comment