aboutsummaryrefslogtreecommitdiff
path: root/js/dist/button.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2019-04-18 14:47:52 +0300
committerGitHub <[email protected]>2019-04-18 14:47:52 +0300
commit091aa1e9fd411440c3ff3c95042a5aa1502e6978 (patch)
tree9343d4a164ad6e2c064d0305ba28e6d8870029e7 /js/dist/button.js
parent5c5b15a077b796510fce745129612ee940b13b89 (diff)
downloadbootstrap-091aa1e9fd411440c3ff3c95042a5aa1502e6978.tar.xz
bootstrap-091aa1e9fd411440c3ff3c95042a5aa1502e6978.zip
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 2e1079dd0..8f3eabfae 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);
+ }
});
/**
* ------------------------------------------------------------------------