Skip to content

Commit

Permalink
Prevent text selection within map canvas div to fix double-click issues.
Browse files Browse the repository at this point in the history
See #6740

Double-clicking on the map breaks panning in Edge and IE11. The issue is
that after double-clicking, Edge & IE perform a text selection within
the div, so then subsequent drag actions are trying to drag the
selection instead of dragging the map. This fixes it by disabling text
selection within the container.
  • Loading branch information
GUI authored and jfirebaugh committed May 25, 2018
1 parent 2b3b9f6 commit 8df0c05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/css/mapbox-gl.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}

.mapboxgl-canvas-container.mapboxgl-interactive:active,
Expand Down

0 comments on commit 8df0c05

Please sign in to comment.