flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
594 stars 40 forks source link

Investigate whether `touchesBegan` is being handled correctly in the presence of a GestureRecognizer #306

Closed janek closed 2 years ago

janek commented 4 years ago

We have found that UIGestureRecognizer was not correctly filtering touchesEnded events before passing them on to UIViews it was anchored on (fixed in #305). We now cover the behaviour of touchedMoved and touchesEnded in our tests. It would be good to investigate the behaviour of touchesBegan, as there's a strong suspicion it's not yet being handled correctly.

Possible first steps: compare behaviour with iOS, see how existing TouchHandlingTests, try writing a failing test for it and finding a fix.

Quick note about this from #305:

From memory, touchesBegan works slightly differently on iOS. If the gesture recogniser fails or doesn't exist then (and only then) will touchesBegan be called.