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

bug: Top level Input Event Handling cannot be stopped from bubbling #3250

Closed
eonarheim opened this issue Oct 22, 2024 Discussed in #3249 · 0 comments · Fixed by #3255
Closed

bug: Top level Input Event Handling cannot be stopped from bubbling #3250

eonarheim opened this issue Oct 22, 2024 Discussed in #3249 · 0 comments · Fixed by #3255
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior

Comments

@eonarheim
Copy link
Member

Bug, we should be able to .cancel() and an event and have it stop bubbling at the top most pointer event handler

Discussed in #3249

Originally posted by johannes-z October 22, 2024
Hello! I've been trying out excalibur.js a little over last few days, but hit a problem with event handlers I couldn't figure out using the docs and github issues.

I implemented drag&drop panning in the scene (think grand strategy game), using https://excaliburjs.com/docs/pointers/#event-handlers. In that scene I render an actor that has a click handler pointerdown like this: https://excaliburjs.com/docs/pointers#handling-pointer-events-on-actors. However, there is no way to stop that event from bubbling up to the scene, so the event handler for drag&drop panning also always fires. I tried evt.nativeEvent.stopPropagation() etc., but it didn't change anything.

Thanks!

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant