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

Commit d73f896

Browse files
author
Gabriel Schulhof
committed
[popup] "detached retina" fix - the window height on iStuff with a retina 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 d73f896

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/widgets/popup.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ define( [ "jquery",
131131

132132
_handleWindowResize: function( e ) {
133133
if ( this._isOpen ) {
134-
if ( !this._ui.container.hasClass( "ui-selectmenu-hidden" ) ) {
134+
if ( ( this._maybeRefreshTimeout() || this._orientationchangeInProgress ) &&
135+
!this._ui.container.hasClass( "ui-selectmenu-hidden" ) ) {
135136
// effectively rapid-close the popup while leaving the screen intact
136137
this._ui.container
137138
.addClass( "ui-selectmenu-hidden" )
138139
.removeAttr( "style" );
139140
}
140-
this._maybeRefreshTimeout();
141141
}
142142
},
143143

@@ -525,6 +525,7 @@ define( [ "jquery",
525525
// the "blue flash" of element focus in android 4.0
526526
setTimeout(function(){
527527
self._ui.container.attr( "tabindex", "0" ).focus();
528+
self._maybeRefreshTimeout();
528529
self._trigger( "afteropen" );
529530
});
530531
},

0 commit comments

Comments
 (0)