Skip to content

Calling preventDefault on touchmove seems to prevent click generation on WPE unlike Chrome, Safari or Firefox #1732

Open

Description

@MikkoSteerpath

We use maplibre and had an issue where taps were not getting registered. We eventually narrowed it down to maplibre calling e.preventDefault() on touch moves, which on Firefox, Chrome and Safari would not prevent the click event from happening, but on WPE it would.

Reading the specification, it is fairly clear that WPE is correct in cancelling the click event, as the spec note says "If, however, either the touchstart, touchmove or touchend event has been canceled during this interaction, no mouse or click events will be fired.", however this does not match Chrome, Firefox or Safari behaviour.

I have opened a ticket that maplibre should not call preventDefault unconditionally on touchmove: maplibre/maplibre-gl-js#8602 .

AI suggest the problem in WPE click generation getting canceled is here, where the comment says that "If the touch event was handled, we must interrupt any gesture detection sequence ongoing so that gestures are not detected by engine itself.". Again, this matches the spec, but not my experience of how Firefox, Chrome and Safari work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions