mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Button: stop disabled button from firing click events. fixes #5945. Behavior was inconsisten between BUTTON and A elements.
This commit is contained in:
parent
116acb4cb2
commit
a7f1659cdc
5
ui/jquery.ui.button.js
vendored
5
ui/jquery.ui.button.js
vendored
@ -103,6 +103,11 @@ $.widget( "ui.button", {
|
||||
})
|
||||
.bind( "blur.button", function() {
|
||||
$( this ).removeClass( focusClass );
|
||||
})
|
||||
.bind( "click.button", function( event ) {
|
||||
if ( options.disabled ) {
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
if ( toggleButton ) {
|
||||
|
Loading…
Reference in New Issue
Block a user