mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks
(cherry picked from commit 597a313ab6
)
This commit is contained in:
parent
ad947c7ba9
commit
3735bab147
1
ui/jquery.ui.button.js
vendored
1
ui/jquery.ui.button.js
vendored
@ -96,6 +96,7 @@ $.widget( "ui.button", {
|
|||||||
})
|
})
|
||||||
.bind( "click.button", function( event ) {
|
.bind( "click.button", function( event ) {
|
||||||
if ( options.disabled ) {
|
if ( options.disabled ) {
|
||||||
|
event.preventDefault();
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user