Skip to content

Commit

Permalink
Don't preventDefault radio buttons
Browse files Browse the repository at this point in the history
as this breaks keyboard navigation for radio button toggles (see
#16223)
  • Loading branch information
patrickhlauke committed Apr 3, 2015
1 parent bb6af65 commit 3c8977f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
e.preventDefault()
if (!$btn.is('input[type="radio"]')) e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
Expand Down

0 comments on commit 3c8977f

Please sign in to comment.