mapbox / mapbox/mapbox-gl-js

Android Chrome - prevent refreshing on touchmove

Open
#7,290 2 comments 0 reactions 1 assignee View on GitHub

@ryanhamley is already working on this.

Since Sep 18, 2018.

environment-specific :desktop_computer:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I'm developing application that handle touchmove event, but when i tested it on android chrome it turned out that when i was moving finger down on screen it caused page to refresh. So my question is: is there a way to prevent such behaviour? I looked up similar issues, but the fix for those issues was setting css property touch-action: none on map container, but this prevents all touch actions when i simply want to overwrite touchmove event. Also i tried to call preventDefault on event object in touchmove callback, but i got message that preventDefault method is not defined

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.