Skip to content
Permalink
Browse files

Popup: Prevent SPACE key event on trigger from scrolling the page

  • Loading branch information...
jzaefferer committed May 4, 2011
1 parent b96126b commit 018590064f43c4003fe7be767f5c1d666e38b22a
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/visual/menu/popup.js
@@ -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) {

0 comments on commit 0185900

Please sign in to comment.
You can’t perform that action at this time.