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

Canvases managed by zebra should not stop event propagation #57

Open
jeevesmkii opened this issue Nov 18, 2014 · 1 comment
Open

Canvases managed by zebra should not stop event propagation #57

jeevesmkii opened this issue Nov 18, 2014 · 1 comment

Comments

@jeevesmkii
Copy link

The Zebra code is littered with calls to Event.stopPropagation(). Web pages using Zebra UI are among the most likely to want to capture certain events globally to prevent their default effects, as well as perform other tasks. For example, to prevent the backspace key from navigating back or "ctrl-r" or the F5 key from performing a refresh. or to use "ctrl-s" to trigger a custom save routine. These handlers will never fire while a Zebra managed canvas is focused

Having to set up additional handlers per-canvas to get these events is wasteful and leads to unmanageable code.

While changing the event bubbling behaviour constitutes a major "binary" break, it should at least be made configurable in the zebra.json file, even if the default behaviour remains preventing event propagation.

@djmittens
Copy link

+1, im having this same issue as a different library that i use to make a game with, registers its keyboard event listeners on the window rather than the element, i cant even replay the events that i want because zebkit is hoarding all the keyboard events itself.

Here is a cool reference example why stopping propogation screws ppl over.
http://css-tricks.com/dangers-stopping-event-propagation/

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