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

OnHover is bubbling even when returning true #4055

Closed
lukemcgregor opened this issue Dec 19, 2019 · 2 comments
Closed

OnHover is bubbling even when returning true #4055

lukemcgregor opened this issue Dec 19, 2019 · 2 comments
Assignees
Labels

Comments

@lukemcgregor
Copy link
Contributor

Description

If you implement onHover on a layer and also on the root deck, and then you return truthy in the layer it still calls onHover on the deck. https://github.com/uber/deck.gl/blob/master/docs/developer-guide/interactivity.md#behavior-of-built-in-event-handling says that this should not bubble when returning true.

Repro Steps

  • Create a deck with a layer which consumes some space
  • implement hover on the layer and the deck with the layer returning true
  • Expected: only one of the onHovers should be called at once
  • Actual: when hovering on the layer component both onHover handlers are called

https://codepen.io/lukemcgregor/pen/GRgWrEY

Environment (please complete the following information):

  • Framework Version: 7.3.6
  • Browser Version: Chrome 79.0.3945.79
  • OS: Mac OSX 10.15.2
@Pessimistress
Copy link
Collaborator

Thanks for reporting. This is indeed a bug. Looks like instead of skipping the root onHover, it is called with an empty pickingInfo.

@Pessimistress
Copy link
Collaborator

Fixed in 7.3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants