From 5178d8b8bab50d5b9e03e00db5340178f8507035 Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Thu, 30 Oct 2014 03:46:49 +0100 Subject: [PATCH] Use RegExp for button plugin's focus shim Fixes #14923. --- js/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2