Skip to content

Commit

Permalink
Fix twbs#16703. Prevent disabled buttons set to active on click.
Browse files Browse the repository at this point in the history
  • Loading branch information
NogsMPLS committed Jun 25, 2015
1 parent d2d7784 commit e475549
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 @@ -110,7 +110,7 @@
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
if (!$btn.hasClass('disabled')) Plugin.call($btn, 'toggle')
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
Expand Down

0 comments on commit e475549

Please sign in to comment.