Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Align iOS, Android, Windows handling of tap gesture event bubbling #842
Description of Change
This change brings iOS, Android, and WinRT/UWP all into alignment on how they treat taps/clicks on a control within a container.
Previously, if a container (Grid, ContentView, Frame, etc.) had a tap gesture assigned to it and contained controls (Label, Box, Entry, etc.) which do not have gestures assigned, the platforms all behaved differently when those controls were tapped. On each platform, some of the controls would bubble the tap gesture up to the container and some would not, and those lists were different on each platform.
With this change, controls which become interactive on tap/click (Entry, Editor, Button, etc.) will not bubble the tap gesture to the container. Controls which do not (Label, Image, Box, Frame) will allow the gesture to bubble up to their container. The two lists are now consistent across the platforms.
Just to be explicit about which controls bubble and which do not, the UITest tests the following matrix:
When no gesture handler is assigned, those that bubble are:
And those that do not bubble are:
Why not fix the cases where the control is disabled instead of just the cases where the control is enabled? Do we not yet agree on the behavior?
How about this for a straw man:
A control that becomes interactive when touched (listed below) has an implicit handler. Disabling a control behaves like an enabled control with a handler that does nothing; disabled controls have an implicit handler that does nothing. A control without an explicit or implicit handler will "bubble" the event to its parent except if InputTransparent is true in which case the event is routed to whatever is behind the control.
Because it's a very difficult problem and I don't want to let perfect be the enemy of good.
It's a difficult problem because Windows considers controls with
Until someone does figure out an answer to that question, I figured getting things in order for enabled controls was better than the total chaos we currently have.
Mar 29, 2017
6 checks passed
I just tested 2.3.5-pre2. While the above statement is true on iOS, it isn't on Android. I have the following setup:
The only way for