From ddf1a4f0fe2fc6ef0bef2e84303ea3452ca85964 Mon Sep 17 00:00:00 2001 From: mmtmr <76145646+mmtmr@users.noreply.github.com> Date: Thu, 28 Jul 2022 12:04:06 +0800 Subject: [PATCH 1/3] remove touchstart event when not in select mode --- src/plots/mapbox/mapbox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plots/mapbox/mapbox.js b/src/plots/mapbox/mapbox.js index a4a42a9ab41..ed021940862 100644 --- a/src/plots/mapbox/mapbox.js +++ b/src/plots/mapbox/mapbox.js @@ -600,7 +600,8 @@ proto.updateFx = function(fullLayout) { map.dragPan.enable(); map.off('zoomstart', self.clearSelect); self.div.onmousedown = null; - + self.div.ontouchstart = null; + self.div.removeEventListener('touchstart', self.div._ontouchstart); // TODO: this does not support right-click. If we want to support it, we // would likely need to change mapbox to use dragElement instead of straight // mapbox event binding. Or perhaps better, make a simple wrapper with the From 34fc1a3754e702308d3844170ef164a256e20fbd Mon Sep 17 00:00:00 2001 From: mmtmr <76145646+mmtmr@users.noreply.github.com> Date: Thu, 28 Jul 2022 12:30:09 +0800 Subject: [PATCH 2/3] add fix log for PR 6281 --- draftlogs/6281_fix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 draftlogs/6281_fix.md diff --git a/draftlogs/6281_fix.md b/draftlogs/6281_fix.md new file mode 100644 index 00000000000..717af45d742 --- /dev/null +++ b/draftlogs/6281_fix.md @@ -0,0 +1 @@ +- Fix mapbox `touch event` after switching back from select mode [[#6281](https://github.com/plotly/plotly.js/pull/6281)] From ad573665ab50b83c6b8597bfa2d5a613748dd0bf Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com> Date: Fri, 12 Aug 2022 17:03:44 -0400 Subject: [PATCH 3/3] Update draftlogs/6281_fix.md --- draftlogs/6281_fix.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draftlogs/6281_fix.md b/draftlogs/6281_fix.md index 717af45d742..f3f844e639c 100644 --- a/draftlogs/6281_fix.md +++ b/draftlogs/6281_fix.md @@ -1 +1,2 @@ -- Fix mapbox `touch event` after switching back from select mode [[#6281](https://github.com/plotly/plotly.js/pull/6281)] + - Fix mapbox `touch event` after switching back from select mode [[#6281](https://github.com/plotly/plotly.js/pull/6281)], + with thanks to @mmtmr for the contribution!