diff options
| author | Heinrich Fenkart <[email protected]> | 2014-10-30 03:46:49 +0100 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-10-30 03:46:49 +0100 |
| commit | 5178d8b8bab50d5b9e03e00db5340178f8507035 (patch) | |
| tree | 59a77d8270efa08692d1b0b53038f9b12bb02a18 | |
| parent | 33e78ed937f90019a2f589defe55eb18b9f60a56 (diff) | |
| download | bootstrap-5178d8b8bab50d5b9e03e00db5340178f8507035.tar.xz bootstrap-5178d8b8bab50d5b9e03e00db5340178f8507035.zip | |
Use RegExp for button plugin's focus shim
Fixes #14923.
| -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 2be02341d..403829490 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); |
