Skip to content

Commit

Permalink
fix #9519 click map event on touch devices (#9526)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis authored and karimnaaji committed Apr 9, 2020
1 parent 2114824 commit f4fd0de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/ui/handler/tap_recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export class TapRecognizer {
this.lastTap = tap;

if (this.count === this.numTaps) {
e.preventDefault();
this.reset();
return tap;
}
Expand Down
2 changes: 2 additions & 0 deletions src/ui/handler/tap_zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class TapZoomHandler {

if (zoomInPoint) {
this._active = true;
e.preventDefault();
setTimeout(() => this.reset(), 0);
return {
cameraAnimation: (map: Map) => map.easeTo({
Expand All @@ -57,6 +58,7 @@ export default class TapZoomHandler {
};
} else if (zoomOutPoint) {
this._active = true;
e.preventDefault();
setTimeout(() => this.reset(), 0);
return {
cameraAnimation: (map: Map) => map.easeTo({
Expand Down

0 comments on commit f4fd0de

Please sign in to comment.