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

e.preventDefault() does't work with Y.on #1893

Open
xlnt-webdesign opened this issue Jul 2, 2014 · 1 comment
Open

e.preventDefault() does't work with Y.on #1893

xlnt-webdesign opened this issue Jul 2, 2014 · 1 comment

Comments

@xlnt-webdesign
Copy link

I read the "A Recipe for a YUI 3 Application" article and tried the loose coupling part with events beeing bound to a default function.

while listening to the widget it is possible to preventDefault.
But listening on Y.on the defaultFn is called before the function in Y.on.
That means, I can't prevent the default function.

Here is a fiddle:
http://jsfiddle.net/ju5LY/

hope I'm wrong and it isn't a bug, but my fault
Daniel

@xlnt-webdesign
Copy link
Author

Here is a link to the docs:
http://yuilibrary.com/yui/docs/api/classes/YUI.html#method_on

excerpt:
Y.on() subscribers for DOM events or custom events published with a defaultFn can prevent the default behavior with e.preventDefault()

This is what i expected, but it doesn't work like that.

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