mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
952 stars 593 forks source link

Keybindings for Controls don't trigger #1103

Open varna opened 2 years ago

varna commented 2 years ago

Keybindings for Controls don't trigger anything. Doesn't matter if you use default true or manual keybindings: true option. I don't even need to make a reproduction, because official example (https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/) doesn't work too.

I asked few friends to try it on their own PCs, Macs and Linux stations, they claim that it doesn't work for them too.

I even tried replacing mapbox-gl-js with maplibre-gl, but there was no difference.

mapbox-gl-js version: 2.7.1 maplibre-gl version: 2.1.7 mapbox-gl-draw version: 1.3.0

Steps to Trigger Behavior

Click p key on keyboard

Expected Behavior

Start drawing polygon

Actual Behavior

Nothing happens

robinsummerhill commented 2 years ago

At some point it seems that the mode keys were changed to:

Helpfully, the title attributes for the button tooltips were not updated. Also the order of the mode buttons on the map is line, polygon, point, which corresponds to keys 2, 3, 1 🙄