aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorPatrick H. Lauke <[email protected]>2019-06-19 10:23:41 +0100
committerXhmikosR <[email protected]>2019-06-19 12:23:41 +0300
commitf0f75379f661587936fdcf7138fe9805838b7a01 (patch)
treef9673b36c0229eb7df0b2546b5587df7767b400d /js/src
parentceffc3a5fd7af7609150048f0651f025ef19672c (diff)
downloadbootstrap-f0f75379f661587936fdcf7138fe9805838b7a01.tar.xz
bootstrap-f0f75379f661587936fdcf7138fe9805838b7a01.zip
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...
Diffstat (limited to 'js/src')
-rw-r--r--js/src/dropdown.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 6bae6a4b4..729b64732 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -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()