Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Popup Reappears after closing when textarea input field expanded on iOS 6 #5157

buckolas opened this Issue · 9 comments

5 participants


On iOS 6, I have an issue when I use a textarea inside of a popup. Here is my HTML:

 <a href="#popupBasic" data-rel="popup">Open Popup</a>
 <div data-role="popup" id="popupBasic">
 <div data-role="fieldcontain">
 <label for="comment">Comments:</label>
 <textarea name="comment" id="comment" data-mini="true"></textarea>
 <input type="submit" value="Submit" data-mini="true"/>
 <a href="#" data-role="button" data-rel="back" data-mini="true">Close</a>

When the popup opens, if I enter multiple lines of text in the textarea and it expands down, then click the Close button, the popup closes and then reopens until I rotate the display or refresh the page.


I'm also experiencing this issue, but it doesn't happen every time.

After reappearing, the popup cannot be closed with either the close button added to the header of the popup using the data-rel="back" attribute or clicking outside the popup itself.

I also tried using onclick="$('#id').popup('close');" on a button with no success.

<div id="id" data-role="popup" style="width: 600px">
       <div data-role="header">
              <h3> TestEntry</h3>
       <div data-role="content">


              <input id="test" type="text"  />           

              <a href="#" data-role="button" data-icon="delete" onclick="$('#id').popup('close');">Cancel</a>

              <button type="submit" data-theme="b">OK</button>

I have seen this issue occur in several places, but my included example above is the only one that I could come up with that is easily reproducible.

@buckolas buckolas closed this
@buckolas buckolas reopened this

I've tested with on iPhone 4S iOS 6 and I don't see an issue.


Would you mind try adding a close button with data-rel=back? Wonder if it may have something to do with it


Ok, done: (
and tested again.

I see that issue in landscape view now.
A second tap on the close button goes back in history then...


Yes, that is what I am seeing as well. Any ideas on the cause?


Ditto on what I am seeing too.


I looked at the issue too, it seems that it is happening only when you resize the popup entering the text, clicking on the close button while your keyboard is on.

It is never happened when you turn off the keyboard and click the close button.

I believe when you click the stop button, keyboard is sliding down causing the document to resize (maybe the resize event), therefore emitting the show event on the popup.


Please check again with the latest master. If you can reproduce the error, please reopen this issue.

@scottjehl scottjehl referenced this issue from a commit
Scott Jehl Merge branch 'master' into tables
* master: (24 commits)
  [select] Implement _destroy() -- Fixes #4661
  Changing ok out to equal; it is more appropriate for this test
  Changing test to make sure it fails when code change is not there
  Renamed class ui-selectmenu-hidden to ui-popup-hidden -- Fixes #5217
  [popup] Rename function _maybeRefreshTimeout to _expectResizeEvent
  [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
  Added "mobileinit" handler to set up options
  Changed urlParseRE to ignore space at beginning. This is expected behavior in browsers. This used to result in pages changing to "%20destination.html" instead of the now "destination.html". Fixes issue #4882
  List autodividers: use trim() to avoid issues with newlines and spaces in markup. Fixes #5197. Thanks @demonslord !
  [popup] Initiate resize expectation during orientationchange -- Fixes #5153
  Select: headers of custom select menus shouldn't inherit the popup corner styling. Fixes #5215.
  [popup] Correctly handle the case when the fallback transition is "none" -- Fixes #5189
  [custom select] Mark as closed after dialog closes - Re: #5195 - Thanks martenbohlin
  [slider] Adding new behaviour to widget definition
  [select] Adding new behaviour to widget definition
  [checkboxradio] Adding new behaviour to widget definition
  [formReset] New behaviour that allows form widgets to become aware of the fact that the form they are in has been reset
  [popup] Only rapid-open the popup if it is open -- Fixes #5157
  Updated third-party libs for Backbone/Require Demo App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.