Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/button.js')
-rw-r--r--js/dist/button.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/dist/button.js b/js/dist/button.js
index 2e1079dd0b..8f3eabfaeb 100644
--- a/js/dist/button.js
+++ b/js/dist/button.js
@@ -188,11 +188,17 @@
});
EventHandler.on(document, Event.FOCUS_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
- button.classList.add(ClassName.FOCUS);
+
+ if (button) {
+ button.classList.add(ClassName.FOCUS);
+ }
});
EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
- button.classList.remove(ClassName.FOCUS);
+
+ if (button) {
+ button.classList.remove(ClassName.FOCUS);
+ }
});
/**
* ------------------------------------------------------------------------