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

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

@jamesjnadeau
Copy link

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
Copy link
Contributor

@jamesjnadeau - See #6014 (comment)

@gabrielschulhof gabrielschulhof added this to the 1.5.0 milestone Jan 22, 2015
@gabrielschulhof gabrielschulhof self-assigned this Jan 22, 2015
gabrielschulhof pushed a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 22, 2015
gabrielschulhof pushed a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 22, 2015
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 jquery-archivegh-6119
gabrielschulhof pushed a commit to gabrielschulhof/jquery-mobile that referenced this issue Jan 22, 2015
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 jquery-archivegh-6119
@ablegrape
Copy link

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
Copy link

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 pushed a commit to kakul/jquery-mobile that referenced this issue Apr 14, 2015
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 jquery-archivegh-6119
Closes jquery-archivegh-7929
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants