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

Prevent default doesn't work in a form submit event handler #80

Open
romaroma opened this issue Jul 27, 2015 · 0 comments
Open

Prevent default doesn't work in a form submit event handler #80

romaroma opened this issue Jul 27, 2015 · 0 comments

Comments

@romaroma
Copy link

We have a regular form submit event handler that just routes to another route when someone click the button. return false here prevents browser from actual form submission attempt which is desired behavior. However after installing zones this functionality was broken, the browser began to submit the form.

Removing the package helped solve the problem.

// events handler
Template.adminTranslations.events({
  'submit #addTranslation': function(e){
    Router.go('adminTranslationCreate');
    return false;
  }
});

Notes: We use iron:router and several Router.onBeforeAction hooks.

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

1 participant