0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Use RegExp for button plugin's focus shim

Fixes #14923.
This commit is contained in:
Heinrich Fenkart 2014-10-30 03:46:49 +01:00
parent 33e78ed937
commit 5178d8b8ba

View File

@ -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);