mapbox / mapbox/mapbox-gl-draw

Delete and Backspace keypresses are ignored in drawing modes

Open
#1,047 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug events
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

**mapbox-gl-js version**: 1.12.0,
**mapbox-gl-draw version**: 1.2.0

### Steps to Trigger Behavior

1. Imagine we have the following code in our Direct Select mode:

```typescript
onKeyUp: function (state: DirectSelectState, event: DrawEvent) {
console.log(event);
}
```

2. Press delete or backspace
3. Note in the console how event is never logged

### Expected Behavior

Delete and backspace should register events like other key presses

### Actual Behavior

No event is registered

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing keyboard event handling for the Direct Select mode and compare how Delete and Backspace are treated with other key presses. Reproduce the issue using the onKeyUp example, then verify that those keys reach the mode callback and are logged like other key presses.

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.