diff options
author | Heinrich Fenkart <hnrch02@gmail.com> | 2014-10-30 05:46:49 +0300 |
---|---|---|
committer | Heinrich Fenkart <hnrch02@gmail.com> | 2014-10-30 05:46:49 +0300 |
commit | 5178d8b8bab50d5b9e03e00db5340178f8507035 (patch) | |
tree | 59a77d8270efa08692d1b0b53038f9b12bb02a18 /js | |
parent | 33e78ed937f90019a2f589defe55eb18b9f60a56 (diff) |
Use RegExp for button plugin's focus shim
Fixes #14923.
Diffstat (limited to 'js')
-rw-r--r-- | js/button.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/button.js b/js/button.js index 2be02341d6..4038294908 100644 --- a/js/button.js +++ b/js/button.js @@ -110,7 +110,7 @@ e.preventDefault() }) .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus') + $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) }) }(jQuery); |