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

Capturing submit event causes problems #19

Open
ile opened this issue Jun 3, 2014 · 1 comment
Open

Capturing submit event causes problems #19

ile opened this issue Jun 3, 2014 · 1 comment

Comments

@ile
Copy link

ile commented Jun 3, 2014

Is this correct? 1991e5e#diff-25e28db7db17846a020f06c1531ab452R235

document.addEventListener('submit', onSubmit, true)

This default onSubmit kicks in first, before my handler, and does history.push which then changes the url before I do my stuff in the handler. Thus, preventDefault() does not have any effect (among other things).

Changing back to earlier would make it work more like expected? As:

document.addEventListener('submit', onSubmit, false)
@ile ile changed the title Capturing form submit causes problems Capturing submit event causes problems Jun 3, 2014
@ile
Copy link
Author

ile commented Aug 26, 2014

Also I think

document.addEventListener('click', onClick, false)

would work better than

document.addEventListener('click', onClick, true)

https://github.com/derbyjs/tracks/blob/master/lib/History.js#L235

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