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

improve initial state #95

Open
serusko opened this issue Nov 27, 2019 · 1 comment
Open

improve initial state #95

serusko opened this issue Nov 27, 2019 · 1 comment

Comments

@serusko
Copy link

serusko commented Nov 27, 2019

I have one small improvement proposal of StatefulTooltip.

from nature of react, there is one case when this tooltip does not work as expected
imagine when u are using StatefulTooltip,
and component is created at moment, when mouse is already in place where tooltip will be rendered, but there is no mouse event fired, so we cannot see tooltip

there is easy way how to reproduce this problem:

  • go over your "tooltiped" element
    -> tooltip is displayed, OK
  • press shortcut for refreshing page (cmd+r / f5 ...)
    -> tooltip its not displayed

proposed solution:

calculate collision of Element.getBoundingClientRect and pointer position on didMount

@durasj
Copy link

durasj commented Nov 28, 2019

Agreed, I have this same problem. Do you please need any more info @romainberger?

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