mapbox / mapbox/mapbox-gl-draw

Keybindings for Controls don't trigger

Open
#1,103 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the official Mapbox GL Draw example using the versions listed, then verify whether pressing `p` triggers polygon drawing. Trace the keyboard handling from that example into mapbox-gl-draw and confirm the fix by checking that the keybinding works without changing the configured `keybindings` option.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.