New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
buckolas opened this Issue Oct 11, 2012 · 9 comments

Comments

Projects
None yet
5 participants
@buckolas

buckolas commented Oct 11, 2012

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">
 <form>
 <div data-role="fieldcontain">
 <label for="comment">Comments:</label>
 <textarea name="comment" id="comment" data-mini="true"></textarea>
 </div>
 <input type="submit" value="Submit" data-mini="true"/>
 </form>
 <a href="#" data-role="button" data-rel="back" data-mini="true">Close</a>
 </div>

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.

@cwburggrab

This comment has been minimized.

Show comment
Hide comment
@cwburggrab

cwburggrab Oct 11, 2012

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>
       <div data-role="content">

              <label>Test:</label>

              <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>
       </div>       
</div>

cwburggrab commented Oct 11, 2012

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>
       <div data-role="content">

              <label>Test:</label>

              <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>
       </div>       
</div>
@buckolas

This comment has been minimized.

Show comment
Hide comment
@buckolas

buckolas Oct 11, 2012

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 commented Oct 11, 2012

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 Oct 11, 2012

@buckolas buckolas reopened this Oct 11, 2012

@MauriceG

This comment has been minimized.

Show comment
Hide comment
@MauriceG

MauriceG Oct 11, 2012

Contributor

I've tested with http://jsfiddle.net/MauriceG/QCZ87/show/light/ on iPhone 4S iOS 6 and I don't see an issue.

Contributor

MauriceG commented Oct 11, 2012

I've tested with http://jsfiddle.net/MauriceG/QCZ87/show/light/ on iPhone 4S iOS 6 and I don't see an issue.

@buckolas

This comment has been minimized.

Show comment
Hide comment
@buckolas

buckolas Oct 11, 2012

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

buckolas commented Oct 11, 2012

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

@MauriceG

This comment has been minimized.

Show comment
Hide comment
@MauriceG

MauriceG Oct 11, 2012

Contributor

Ok, done: http://jsfiddle.net/MauriceG/QCZ87/2/show/light (http://jsfiddle.net/MauriceG/QCZ87/2/)
and tested again.

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

Contributor

MauriceG commented Oct 11, 2012

Ok, done: http://jsfiddle.net/MauriceG/QCZ87/2/show/light (http://jsfiddle.net/MauriceG/QCZ87/2/)
and tested again.

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

@buckolas

This comment has been minimized.

Show comment
Hide comment
@buckolas

buckolas Oct 11, 2012

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

buckolas commented Oct 11, 2012

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

@cwburggrab

This comment has been minimized.

Show comment
Hide comment
@cwburggrab

cwburggrab Oct 11, 2012

Ditto on what I am seeing too.

cwburggrab commented Oct 11, 2012

Ditto on what I am seeing too.

@MisterDr

This comment has been minimized.

Show comment
Hide comment
@MisterDr

MisterDr Oct 18, 2012

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.

MisterDr commented Oct 18, 2012

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.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Oct 23, 2012

Contributor

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

Contributor

gabrielschulhof commented Oct 23, 2012

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

scottjehl pushed a commit that referenced this issue Oct 31, 2012

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
  Whitespace
  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