corejavascript / corejavascript/typeahead.js
Clicking suggestion scrollbar closes suggestions in MS Edge, inside element with a tabindex
- Dominant language
- JavaScript
- Stars
- 968
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
This is basically the same problem as with https://github.com/twitter/typeahead.js/issues/705 except that it specifically only happens in Edge, when the `` is inside an element with `tabindex="-1"` (in my case, a bootstrap modal)
I've managed to reliably reproduce the issue with https://jsfiddle.net/2Ljy9c9k/5/
Using the Edge browser, run the fiddle, type "a" into the box, then try to grab the scrollbar. It immediately closes. All other browsers (including IE 11) did not have this issue. If you remove the `tabindex="-1"` attribute from the `#hello` element, everything works as expected.
For the time being I'm working around this by removing the tabindex from the modal, but this is undesireable in the long run as it allows tab navigation to run off of the modal and onto other elements in the page while the modal is still up.
I'm guessing that the `_hacks` function might need to be updated to include Edge with the focus/blur hack.
Contributor guide
Assessment
This issue has not been assessed yet.