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

Commit 6d2c79a

Browse files
author
Gabriel Schulhof
committed
Popup: Request window size during resize handling
Platform: iOS 7, page saved to home screen For some mysterious reason this prevents the subsequent focus on an input inside the popup caused by the user clicking on said input from somehow resulting in a vclick on the popup's screen which, in turn, causes the popup to close. I should sign up for a course on the occult. Fixes gh-6961
1 parent 3293d59 commit 6d2c79a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js/widgets/popup.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,16 @@ $.widget( "mobile.popup", {
255255
},
256256

257257
_handleWindowResize: function(/* theEvent */) {
258+
259+
// https://github.com/jquery/jquery-mobile/issues/6961
260+
// Platform: iOS 7, page saved to home screen
261+
// Cue background occult chanting - for some reason retrieving the window coordinates at
262+
// this point prevents subsequent focusins on the popup's inputs, if present, from
263+
// resulting in a vclick on the popup's screen which, quite legitimately, causes the popup
264+
// to close. At this point, I would like to request that the reader scratch their head in
265+
// bewilderment.
266+
getWindowCoordinates();
267+
258268
if ( this._isOpen && this._ignoreResizeTo === 0 ) {
259269
if ( ( this._expectResizeEvent() || this._orientationchangeInProgress ) &&
260270
!this._ui.container.hasClass( "ui-popup-hidden" ) ) {

0 commit comments

Comments
 (0)