mapbox / mapbox/mapbox-gl-geocoder
should not refocus after selecting result
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
please consider adding an option to disable this:
```
this._inputEl.focus();
this._inputEl.scrollLeft = 0;
this._inputEl.setSelectionRange(0, 0);
```
semi-related: imho, on focus, it should `this._inputEl.select()` - but not a big enough issue for me to make a github issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the result-selection code containing the shown focus, scrollLeft, and setSelectionRange calls. Read the surrounding control behavior and determine how an option would disable refocusing after a result is selected; done means that option preserves the user's focus without changing the default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100