Permalink
Browse files

[popup] Only rapid-open the popup if it is open -- Fixes #5157

  • Loading branch information...
gabrielschulhof committed Oct 23, 2012
1 parent 809cd55 commit 356f5a4c94841410abfe40d2d75ee6e51ae1f3d0
Showing with 13 additions and 9 deletions.
  1. +13 −9 js/widgets/popup.js
View
@@ -109,14 +109,19 @@ define( [ "jquery",
},
_resizeTimeout: function() {
if ( !this._maybeRefreshTimeout() ) {
// effectively rapid-open the popup while leaving the screen intact
this._trigger( "beforeposition" );
this._ui.container
.removeClass( "ui-selectmenu-hidden" )
.offset( this._placementCoords( this._desiredCoords( undefined, undefined, "window" ) ) );
if ( this._isOpen ) {
if ( !this._maybeRefreshTimeout() ) {
// effectively rapid-open the popup while leaving the screen intact
this._trigger( "beforeposition" );
this._ui.container
.removeClass( "ui-selectmenu-hidden" )
.offset( this._placementCoords( this._desiredCoords( undefined, undefined, "window" ) ) );
this._resizeScreen();
this._resizeScreen();
this._resizeData = null;
this._orientationchangeInProgress = false;
}
} else {
this._resizeData = null;
this._orientationchangeInProgress = false;
}
@@ -129,8 +134,7 @@ define( [ "jquery",
},
_handleWindowOrientationchange: function( e ) {
if ( !this._orientationchangeInProgress ) {
if ( !this._orientationchangeInProgress && this._isOpen ) {
// effectively rapid-close the popup while leaving the screen intact
this._ui.container
.addClass( "ui-selectmenu-hidden" )

0 comments on commit 356f5a4

Please sign in to comment.