Permalink
Browse files

[popup] "detached retina" fix - the window height on iStuff with a re…

…tina display seems to fluctuate by one pixel during scroll, causing a spurious resize event right after popup open, even though window size is constant during the entire opening sequence
  • Loading branch information...
1 parent 48e1674 commit 0c4b2f35cfe0c16d95a618d9f8c43d335711ff28 @gabrielschulhof gabrielschulhof committed Oct 25, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/widgets/popup.js
View
@@ -134,13 +134,13 @@ define( [ "jquery",
_handleWindowResize: function( e ) {
if ( this._isOpen ) {
- if ( !this._ui.container.hasClass( "ui-selectmenu-hidden" ) ) {
+ if ( ( this._maybeRefreshTimeout() || this._orientationchangeInProgress ) &&
+ !this._ui.container.hasClass( "ui-selectmenu-hidden" ) ) {
// effectively rapid-close the popup while leaving the screen intact
this._ui.container
.addClass( "ui-selectmenu-hidden" )
.removeAttr( "style" );
}
- this._maybeRefreshTimeout();
}
},
@@ -525,6 +525,7 @@ define( [ "jquery",
_completeOpen: function() {
this._ui.container.attr( "tabindex", "0" ).focus();
+ this._maybeRefreshTimeout();
this._trigger( "afteropen" );
},

0 comments on commit 0c4b2f3

Please sign in to comment.