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 form submission does not work as expected if the url of the page does not contain a get variable #6119

Closed
jamesjnadeau opened this Issue Jul 1, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@jamesjnadeau

jamesjnadeau commented Jul 1, 2013

I've outlined this here as well:
https://forum.jquery.com/topic/form-submit-button-in-jquery-mobile-popup-does-not-do-post-back-on-first-click#14737000004284831

Seems someone found this problem before I did but didn't leave enough for someone to run with. I hope to have filled this gap.

(all of this involves the first page load, I'm not navigating anywhere else via ajax)

I have created an example of this issue here:
http://jsbin.com/ikijas

The gist of the issue is that if I am on a page with url such as:
example.com/test/

and I have a form contained with in a popup, it will not submit on the first try, but will close the popup. Upon opening the popup again, and clicking on the same button(which will now have the ui-btn-active class), the form then submits as expected.

On a page such as:
example.com/test?test=1

Everything works as expected.

Thank you in advance for your time! Any help or suggestions are much appreciated.

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot
Member

jaspermdegroot commented Jul 1, 2013

@gabrielschulhof gabrielschulhof added this to the 1.5.0 milestone Jan 22, 2015

@gabrielschulhof gabrielschulhof self-assigned this Jan 22, 2015

gabrielschulhof added a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 22, 2015

gabrielschulhof added a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 22, 2015

Popup: pagecontainerbeforechange with reloadPage requires immediate flag
The popup must not prevent default when going back to a page with the same URL
from which it was opened, if the reloadPage flag is set. Rather, it must close
immediately, handling the page change event as if the user were navigating to a
different page.

Fixes gh-6119

gabrielschulhof added a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 22, 2015

Popup: pagecontainerbeforechange with reloadPage requires immediate flag
The popup must not prevent default when going back to a page with the same URL
from which it was opened if the reloadPage flag is set. Rather, it must close
immediately, handling the page change event as if the user were navigating to a
different page.

Fixes gh-6119
@ablegrape

This comment has been minimized.

Show comment
Hide comment
@ablegrape

ablegrape Mar 11, 2015

I have run into this precise issue as well. Beyond adding a fake GET parameter to the page URL, any suggestions for a workaround between now and when this is fixed?

Many thanks for your help.

ablegrape commented Mar 11, 2015

I have run into this precise issue as well. Beyond adding a fake GET parameter to the page URL, any suggestions for a workaround between now and when this is fixed?

Many thanks for your help.

@ablegrape

This comment has been minimized.

Show comment
Hide comment
@ablegrape

ablegrape Mar 11, 2015

Update to my earlier question for anyone else who may run into this between now and 1.5.0: an explicit form submission via onclick= seems to do the trick.

ablegrape commented Mar 11, 2015

Update to my earlier question for anyone else who may run into this between now and 1.5.0: an explicit form submission via onclick= seems to do the trick.

kakul added a commit to kakul/jquery-mobile that referenced this issue Apr 14, 2015

Popup: pagecontainerbeforechange with reloadPage requires immediate flag
The popup must not prevent default when going back to a page with the same URL
from which it was opened if the reloadPage flag is set. Rather, it must close
immediately, handling the page change event as if the user were navigating to a
different page.

Fixes gh-6119
Closes gh-7929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment