Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions draftlogs/6281_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- 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!
3 changes: 2 additions & 1 deletion src/plots/mapbox/mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down