diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-04-18 14:47:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 14:47:52 +0300 |
commit | 091aa1e9fd411440c3ff3c95042a5aa1502e6978 (patch) | |
tree | 9343d4a164ad6e2c064d0305ba28e6d8870029e7 /js/dist/button.js | |
parent | 5c5b15a077b796510fce745129612ee940b13b89 (diff) |
v5 dist (#28657)
Diffstat (limited to 'js/dist/button.js')
-rw-r--r-- | js/dist/button.js | 10 |
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); + } }); /** * ------------------------------------------------------------------------ |