Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
[popup] "detached retina" fix - the window height on iStuff with a re…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Gabriel Schulhof committed Oct 25, 2012
1 parent 37daf96 commit d73f896
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/widgets/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
},

Expand Down Expand Up @@ -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" );
});
},
Expand Down

0 comments on commit d73f896

Please sign in to comment.