mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-09 23:26:40 +02:00
don't use e.target incase button has icon or other content inside it
This commit is contained in:
Binary file not shown.
2
docs/assets/js/bootstrap-button.js
vendored
2
docs/assets/js/bootstrap-button.js
vendored
@@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
||||||
$(e.target).button('toggle')
|
$(e.currentTarget).button('toggle')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
2
js/bootstrap-button.js
vendored
2
js/bootstrap-button.js
vendored
@@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
||||||
$(e.target).button('toggle')
|
$(e.currentTarget).button('toggle')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user