From: Jörn Zaefferer Date: Mon, 5 Sep 2011 15:59:36 +0000 (+0200) Subject: Popup: Missing semicolon. Can't use :ui-button selected if button isn't loaded. X-Git-Tag: 1.9m6~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=02c821da6e10bbdd31424949d73a1c2c603108fe;p=jquery-ui.git Popup: Missing semicolon. Can't use :ui-button selected if button isn't loaded. --- diff --git a/ui/jquery.ui.popup.js b/ui/jquery.ui.popup.js index 508209a55..8e5cf198c 100644 --- a/ui/jquery.ui.popup.js +++ b/ui/jquery.ui.popup.js @@ -45,13 +45,13 @@ $.widget( "ui.popup", { .attr( "aria-owns", this.element.attr( "id" ) ); this.element - .addClass( "ui-popup" ) + .addClass( "ui-popup" ); this.close(); this._bind(this.options.trigger, { keydown: function( event ) { // prevent space-to-open to scroll the page, only happens for anchor ui.button - if ( this.options.trigger.is( "a:ui-button" ) && event.keyCode == $.ui.keyCode.SPACE ) { + if ( $.ui.button && this.options.trigger.is( "a:ui-button" ) && event.keyCode == $.ui.keyCode.SPACE ) { event.preventDefault(); } // TODO handle SPACE to open popup? only when not handled by ui.button