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

Tooltip does not remain at point location, follows user on scroll (Touch devices) #185

Open
galvinc opened this issue Jan 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@galvinc
Copy link

galvinc commented Jan 16, 2024

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

  • the tooltips do not close themselves on scroll causing the tooltips to remain open in touch devices as the user scrolls
  • tooltip remains on screen even after the chart is out of view and only closes after another touch to the screen
  • the tooltip does not remain at the location which the point is and follows user as they scroll
  • tooltip components are defaulted into the chart props so disabling manually using the api is not ideal

Expected behavior

  • tooltip should disappear when user scrolls (at least on touch devices)

Minimal reproduction of the problem with instructions

  • create a standard line chart, and put it on a page that is scrollable
  • open a tooltip and scroll

What is the motivation / use case for changing the behavior?

  • the tooltip persisting even though user has scrolled past the chart, it does not remain at the location of the point

Environment


Libs:
- react version: 18.2.0
- reaviz version: 14.9.7


Browser:
- all browsers
 
For Tooling issues:
- Node version: 18.18.2
- Platform:  ios, android, touch devices

Others:

Recording of demo using simple linear chart config

https://github.com/reaviz/reaviz/assets/105822956/ff35fd72-0415-4c0e-b6e6-0b0c9f496fd7
<LineChart width={350} height={250} data={[ { key: new Date('11/29/2019'), data: 1 }, { key: new Date('11/30/2019'), data: 2 }, { key: new Date('12/1/2019'), data: 3 } ]} />

@amcdnl amcdnl added the bug Something isn't working label Jan 16, 2024
@amcdnl amcdnl self-assigned this Jan 16, 2024
@amcdnl
Copy link
Member

amcdnl commented Jan 16, 2024

Thanks for the bug report. I've noticed this in the past as well, can you confirm its all charts or just some?

@galvinc
Copy link
Author

galvinc commented Jan 16, 2024

HI Austin, I experimented with a few chart types in the storybook docs (just resizing the browser to make it scrollable) and I noticed the issue for all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants