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

onMouseLeave not getting called #318

Open
soichih opened this issue May 1, 2023 · 1 comment
Open

onMouseLeave not getting called #318

soichih opened this issue May 1, 2023 · 1 comment

Comments

@soichih
Copy link

soichih commented May 1, 2023

Hello. I am trying to capture onMouseLeave event when a user move a mouse cursor out of the Plot.

<Plot onMouseLeave={()=>{console.log("good bye!")}}/>

onMouseLeave event seems to be ignored by this component. Is this expected? Is there another way to capture this event?

@soichih
Copy link
Author

soichih commented May 1, 2023

This seems to work.


<div onMouseLeave={()=>{console.log("good bye!")}}>
    <Plot/>
</div>

I just realized, however, that what I really need is an event handler when a user leaves the "plot" area - not the whole "paper". I want something similar to onMouseLeave handler getting called when a user navigates away from the Plotly plots inside the paper area.

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