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:
authorXhmikosR <xhmikosr@gmail.com>2019-04-18 14:47:52 +0300
committerGitHub <noreply@github.com>2019-04-18 14:47:52 +0300
commit091aa1e9fd411440c3ff3c95042a5aa1502e6978 (patch)
tree9343d4a164ad6e2c064d0305ba28e6d8870029e7 /js/dist/button.js
parent5c5b15a077b796510fce745129612ee940b13b89 (diff)
v5 dist (#28657)
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);
+ }
});
/**
* ------------------------------------------------------------------------