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

Conflicts:

	js/widgets/popup.js
1 parent 37daf96 commit d73f8968f76728de6cd42dce508cfdf6327b1b53 @gabrielschulhof gabrielschulhof committed Oct 25, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/widgets/popup.js
View
@@ -131,13 +131,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",
// the "blue flash" of element focus in android 4.0
setTimeout(function(){
self._ui.container.attr( "tabindex", "0" ).focus();
+ self._maybeRefreshTimeout();
self._trigger( "afteropen" );
});
},

0 comments on commit d73f896

Please sign in to comment.