Popup: Missing semicolon. Can't use :ui-button selected if button isn't loaded.

This commit is contained in:
Jörn Zaefferer 2011-09-05 17:59:36 +02:00
parent c5ba0535cf
commit 02c821da6e

View File

@ -45,13 +45,13 @@ $.widget( "ui.popup", {
.attr( "aria-owns", this.element.attr( "id" ) ); .attr( "aria-owns", this.element.attr( "id" ) );
this.element this.element
.addClass( "ui-popup" ) .addClass( "ui-popup" );
this.close(); this.close();
this._bind(this.options.trigger, { this._bind(this.options.trigger, {
keydown: function( event ) { keydown: function( event ) {
// prevent space-to-open to scroll the page, only happens for anchor ui.button // 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(); event.preventDefault();
} }
// TODO handle SPACE to open popup? only when not handled by ui.button // TODO handle SPACE to open popup? only when not handled by ui.button