mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 15:44:51 +02:00
Closing dropdown with ESC correctly sets focus to toggle (#28928)
Just firing the focus event isn't enough ... need to actually call the proper `focus()` method for it to actually do it...
This commit is contained in:
committed by
XhmikosR
parent
ceffc3a5fd
commit
f0f75379f6
@@ -486,7 +486,7 @@ class Dropdown {
|
||||
|
||||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
EventHandler.trigger(SelectorEngine.findOne(Selector.DATA_TOGGLE, parent), 'focus')
|
||||
SelectorEngine.findOne(Selector.DATA_TOGGLE, parent).focus()
|
||||
}
|
||||
|
||||
Dropdown._clearMenus()
|
||||
|
Reference in New Issue
Block a user