Fix double-click issues in Edge and IE #6743
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #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.
A few additional notes:
user-select
is only a working draft standard, although support seems pretty universal as long as vendor prefixes are used.mapboxgl-canvas-container
or.mapboxgl-canvas-container .mapboxgl-canvas
seems to work, so not sure if one or the other might be more appropriate. In either case, text selection still seems to work for other things, like controls or popups, since those are outside the canvas container..mapboxgl-ctrl-nav-compass
, which as far as I can tell isn't used at all in the app (only.mapboxgl-ctrl-compass
seems to be used). So I'm not sure if that should be removed or cleaned up (happy to open a separate PR if so).Thanks!
Launch Checklist
document any changes to public APIspost benchmark scorestagged@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes