diff options
| author | Heinrich Fenkart <[email protected]> | 2014-10-30 04:42:18 +0100 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-10-30 04:42:18 +0100 |
| commit | 4b165332be72e8ba9315d4cb709dce5cb0a0db2c (patch) | |
| tree | 59a77d8270efa08692d1b0b53038f9b12bb02a18 | |
| parent | 33e78ed937f90019a2f589defe55eb18b9f60a56 (diff) | |
| parent | 5178d8b8bab50d5b9e03e00db5340178f8507035 (diff) | |
| download | bootstrap-4b165332be72e8ba9315d4cb709dce5cb0a0db2c.tar.xz bootstrap-4b165332be72e8ba9315d4cb709dce5cb0a0db2c.zip | |
Merge pull request #14925 from twbs/button-focus-use-regexp
Use RegExp for button plugin's focus shim
| -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); |
