mapbox / mapbox/mapbox-gl-geocoder

keydown on mobile

Open
#377 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug
Dominant language
JavaScript
Stars
388
Forks
181
PR merge metrics
No merged PRs in 30d

Description

keydown isn't triggering on my mobile. as such, i have set an event listener on input:

```
export default class Geocoder extends MapboxGeocoder {
onAdd(...args) {
const el = super.onAdd(...args);
this._inputEl.addEventListener('input', debounce(this._onKeyDown, 200));
return el;
}
}
```

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 at the Geocoder.onAdd entry point and inspect how this._inputEl handles keyboard and input events. Reproduce the issue on a mobile device, then trace the existing geocoding trigger behavior. Done means mobile input produces the expected geocoding behavior without requiring the reported workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.