Actually this is a problem. But it can be a new idea.
I could be wrong but I think there should be an
option to disable handleWindowResize or it can run
manually.
Through this way, we can allow to overlap the
popup with the virtual keyboard. So we can use popup like a
simple div.
- _handleWindowResize:
function(/* theEvent */) {
-
if ( this._isOpen && this._ignoreResizeTo === 0 )
{
-
if ( ( this._expectResizeEvent() ||
this._orientationchangeInProgress ) &&
-
!this._ui.container.hasClass( "ui-popup-hidden"
) ) {
-
/*If we can control the following line It
would be perfect for Mobile
development*/
-
this._ui.container
-
.addClass( "ui-popup-hidden ui-popup-truncate"
)
-
.removeAttr( "style" );
-
}
-
}
-
}
I've asked my case on
stackoverflow. Thanks to Omar, I could try a new
method. But it doesn't work for me properly.
My story;
I've developed a PhoneGap app using Jquery Mobile 1.4.3
. My login page is a popup. And I faced with an endless process
loop. The loop works with this order, Android opens its virtual
keyboard, jQuery Mobile re-positioning the popup because the
windows size has changed (so _handleWindowResize works in
jquery.mobile.1.4.3.js and loses the focus). Android closes the
virtual keyboard because there is no a focused input area. At the
same time jQuery shows the popup at the center of the window but
the window size has recently changed and then jQuery must show the
popup at the new center of the window.
I can write an "If block" into the jquery library.
However, it will be more difficult to manage my app.
Step by step my processes are like the following;
1. A user click the logon button
2. My popup page is opened
----------- first loop starts --------------
3. The user clicks the username field to type username
4. The cursor focuses the field
5. Android opens the virtual keyboard
6. Then jQuery try to reposition because the keyboard has
shown and the window size has changed. So, popup hides and loses the focus.
7. Then Android virtual keyboard is hidden because there is
no any active input.
8. jQuery shows the new popup without input focus
------------ first loop ends -----------
9. (Again) The user clicks the username field to type username
10. (Again) The cursor focuses the field
11. (Again)
12. (Again)
13. ....