Commit 5178d8b8 authored by Heinrich Fenkart's avatar Heinrich Fenkart

Use RegExp for button plugin's focus shim

Fixes #14923.
parent 33e78ed9
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
e.preventDefault() e.preventDefault()
}) })
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { .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); }(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment