Skip to content
This repository

url of form is miscalculated #1923

Closed
anho opened this Issue June 24, 2011 · 3 comments

2 participants

Andreas Hörnicke Kin Blas
Andreas Hörnicke
anho commented June 24, 2011

Being on a page with the url 'http://sub.domain.tld/account/login' and having a form-element

<form method="post" id="form_login">

results in a call to '/account/undefined'.

Andreas Hörnicke
anho commented June 24, 2011

Adding <form action="/account/login"> helps, but gives me http://sub.domain.tld/account/login#/account/login in location bar. Should be http://sub.domain.tld/account/login#/tasks/list because of a redirect.

Kin Blas
jblas commented June 24, 2011

@h-andreas

FYI I have a fix for the undefined problem. I'll check it in once I finish writing the unit tests for it.

Regarding your issue with the redirect ... we can't tell when a redirect happens because the browser only calls us back AFTER the redirect has happened so we have no clue that one occurred. That said we've been telling folks to place a data-url="/tasks/list" on their page element in the results.

You can read more about it here:

http://jquerymobile.com/test/#/test/docs/pages/docs-navmodel.html

Kin Blas jblas referenced this issue from a commit June 27, 2011
Kin Blas - Fixed issue #1923 - url of form is miscalculated
	- Added code to calculate whether to choose the documentUrl or the page Url in the case where an action is not specified on a form element.

	- Fixed bug in the navigation "submit" handler where an error was being thrown if "type" was not specified.

	- Fixed typo "diabled" id typos in tests/unit/navigation/index.html.

	- Added tests for form submissions with no action in both base and non-base specified cases.
0d65a0d
Kin Blas
jblas commented June 27, 2011

The fix for the action attribute not being specified has landed on the HEAD:

0d65a0d

@h-andreas

Kin Blas jblas closed this June 27, 2011
Timmy Willison timmywil referenced this issue from a commit June 27, 2011
Kin Blas - Fixed issue #1923 - url of form is miscalculated
	- Added code to calculate whether to choose the documentUrl or the page Url in the case where an action is not specified on a form element.

	- Fixed bug in the navigation "submit" handler where an error was being thrown if "type" was not specified.

	- Fixed typo "diabled" id typos in tests/unit/navigation/index.html.

	- Added tests for form submissions with no action in both base and non-base specified cases.
41d649d
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.