mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Popup: Prevent SPACE key event on trigger from scrolling the page
This commit is contained in:
parent
b96126b398
commit
018590064f
@ -37,6 +37,12 @@ $.widget( "ui.popup", {
|
||||
this.close();
|
||||
|
||||
this._bind(this.options.trigger, {
|
||||
keydown: function( event ) {
|
||||
// prevent space-to-open to scroll the page
|
||||
if (event.keyCode == $.ui.keyCode.SPACE) {
|
||||
event.preventDefault()
|
||||
}
|
||||
},
|
||||
click: function( event ) {
|
||||
event.preventDefault();
|
||||
if (this.open) {
|
||||
|
Loading…
Reference in New Issue
Block a user