mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Button: stop disabled button from firing click events. fixes #5945. Behavior was inconsisten between BUTTON and A elements.
(cherry picked from commit a7f1659cdc
)
This commit is contained in:
parent
870977ae6b
commit
4c218eeb0a
5
ui/jquery.ui.button.js
vendored
5
ui/jquery.ui.button.js
vendored
@ -102,6 +102,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