RFR: 8242577: Cell selection fails on iOS most of the times

Jose Pereda jpereda at openjdk.java.net
Tue Apr 14 10:40:43 UTC 2020


There are cases when iOS sends one or more NSTouchPhaseMoved for a given touch event, in between NSTouchPhaseBegan and
NSTouchPhaseEnded , even if the initial event location didn't change.

By default, all these events are emulated as mouse enter/down, drag and up/exit events.

However, when the user taps quickly or even holds steady on a cell, if these touch moved events are generated and sent
as mouse drag events, the cell selection fails, as the flag `latePress` used in
[CellBehaviorBase](https://github.com/openjdk/jfx/blob/master/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/CellBehaviorBase.java#L191)
is set to false, preventing the cell selection that should happen upon touch release event.

This PR prevents emulating mouse drag events when the touch event doesn't change its location.

-------------

Commit messages:
 - Don’t emulate as mouse drag events touch moved events if location didn’t change

Changes: https://git.openjdk.java.net/jfx/pull/181/files
 Webrev: https://webrevs.openjdk.java.net/jfx/181/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8242577
  Stats: 8 lines in 2 files changed: 7 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/181.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/181/head:pull/181

PR: https://git.openjdk.java.net/jfx/pull/181


More information about the openjfx-dev mailing list