-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
The text editing stack does not correctly handle mouse events on mobile platforms and tap events on desktop platforms. We should survey the native behaviors in these situations and make sure Flutter behaves the same as native.
Current behavior
Currently, Flutter's behavior in these situations is mostly a relic of adding desktop/mouse support to a framework that was previously mobile/touch only.
For an example of touch events on desktop, double tapping on any desktop platform will show the text selection toolbar (code).
An example of mouse events on mobile would be that right clicking always shows the text selection toolbar (code) even on all mobile platforms.
We should survey these cases on our supported platforms and make sure Flutter behaves correctly.
Behaviors (todo)
| Behavior | Flutter app | Native app |
|---|---|---|
| Right click on Android | Show menu | ? |
| Right click on iOS | Show menu | Nothing? |
| Double tap on Windows | Shows menu | Selects word, doesn't show menu |
| Double tap on Linux | Show menu | ? |
| Double tap on Mac | Show menu | ? |
| Long press on Windows | Show menu | Shows menu |
| Long press on Linux | Show menu | ? |
| Long press on Mac | Show menu | ? |
Related
As of #104647, Flutter will strictly show the text selection menu based on the platform, not pointer type (tap vs. click).
CC @TahaTesser who I believe has discussed this problem with me before.