Skip to content
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

ng-submit does not prevent jquery mobiles form submit handling #92

Closed
JohannesRudolph opened this issue Dec 19, 2012 · 3 comments
Closed

Comments

@JohannesRudolph
Copy link

Jquery mobile collides in a very unfortunate manner with angular.js when handling forms.

The following fiddle demonstrates that angular does not successfully prevent jqm from loading the next page when ajax is not disabled. It only successfully prevents the browsers default action with event.preventdefault().

http://jsfiddle.net/FHVMh/11

Any way to get jqm out of the way? I tried disabling ajax on the form by specifying data-ajax="false" but a bug in jqm (jquery-archive/jquery-mobile#4896) currently prevents this.

Related to that is why we need to disable support for dynamicBaseTag explicitly (which works around the jqm bug)?

@JohannesRudolph
Copy link
Author

Kind of related (while trying to make jqm not fail on a form with data-ajax="false" without an action attribute on it): Why is the adapter setting this in jqmDisableHashChange?

if ($.support.dynamicBaseTag) {
            $.support.dynamicBaseTag = false;
            $.mobile.base.set = function () {
            };
        }

@tbosch
Copy link
Contributor

tbosch commented Dec 21, 2012

Hi,
the dynamic base tag is now enabled again..

@tbosch
Copy link
Contributor

tbosch commented Dec 21, 2012

Hi,
here is an updated jsfiddle with no action attribute (by which the browser will not post the form), and a data-ajax="false" attribute on the form. This works well: http://jsfiddle.net/FHVMh/14/

Closing this. Please open it again if you have more problems.

Tobias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants