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

how to prevent the default action? #2

Closed
neonstalwart opened this issue Apr 6, 2014 · 2 comments
Closed

how to prevent the default action? #2

neonstalwart opened this issue Apr 6, 2014 · 2 comments

Comments

@neonstalwart
Copy link
Collaborator

there are a number of events that might often have preventDefault called

  • contextmenu to prevent the default context menu and show a custom one
  • submit to prevent the browser redirecting/reloading when a form is submitted and instead submitting via xhr
  • click on an anchor when using the history API to navigate

using dom-delegator, how can preventDefault be called? it's not on the pseudo-event object passed to the handler.

@Raynos
Copy link
Owner

Raynos commented Apr 6, 2014

Good catch. I'll need to implement this

@Raynos Raynos mentioned this issue Apr 8, 2014
17 tasks
@Raynos
Copy link
Owner

Raynos commented Apr 9, 2014

Added a preventDefault() method in v6.3.0

I also store the original event on ev._rawEvent for any other custom programming.

@Raynos Raynos closed this as completed Apr 9, 2014
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