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

scrollHide not hiding tooltip on mobile #248

Closed
ryan-hamblin opened this issue Jan 30, 2017 · 22 comments · Fixed by #375
Closed

scrollHide not hiding tooltip on mobile #248

ryan-hamblin opened this issue Jan 30, 2017 · 22 comments · Fixed by #375
Milestone

Comments

@ryan-hamblin
Copy link

ryan-hamblin commented Jan 30, 2017

I'm assuming this has something to do with the "hover" event since there isn't really one in Mobile. I'm wondering if anyone else has run into this problem and come up with a solution, I don't want to have to add eventHandlers all over to capture the scroll event.

Here is an example of my code:

<ReactToolTip 
    multiline={true}
    scrollHide={true}
    scrollResize={true}
    class="tipOverrides"
    id={tipid}
    effect="solid"
    place='top' 
    type='info'/>

I'm trying to use the scrollHide and scrollResize events according to docs.

@philraj
Copy link

philraj commented Feb 15, 2017

scrollHide is actually not working at all for me (on desktop). Are you using a single top-level <ReactTooltip> element?

@ajritch
Copy link

ajritch commented Mar 20, 2017

+1 to scrollHide not working (on desktop), not using a single top-level element.

@huumanoid
Copy link
Contributor

Hey guys, can this issue be reproduced at the examples page?
I can see that the left tooltip of the "Theme and delay" section reproduces the same issue.
But that issue caused by delayHide.

Please, provide more information how to reproduce this.

@ryan-hamblin
Copy link
Author

to clarify @philraj and along with what @ajritch said, I'm not using this as a top level element at all. It's actually being used on a table that lazy loads rows "Fixed-Data-Table" to be exact. I ended up re writing the table and building my own tooltip. haha good ol' fashioned work around/work through.

@huumanoid to reproduce, simply install the element, hover to activate and show the tooltip, and start scrolling. It wont go away. :)

@philraj
Copy link

philraj commented Mar 21, 2017

@huumanoid No, can't reproduce it with the examples given. It might be because I'm using the tooltips within overflow: scroll containers in my project. Are you able to test that case? I don't have time to test it myself unfortunately.

I am using a single <ReactTooltip/> component but that doesn't seem to be the deciding factor here.

@huumanoid huumanoid added this to the 3.2.11 milestone Mar 29, 2017
@huumanoid
Copy link
Contributor

huumanoid commented Mar 29, 2017

Thanks guys. I think I've catched it. I'm going to fix it in 3.2.11 or 3.2.12.

<div id="root">
  <ReactTooltip />
  <div style={{ width: '5000px'; height: '5000px' }} />
</div>

@guzhavin
Copy link

This problem solved?

@ryan-hamblin
Copy link
Author

I believe so. Should I close the issue?

@guzhavin
Copy link

@ryanhca I see this bug in the current version.

@aronhelser
Copy link
Collaborator

Based on a comment in #291, there is a work-around. add data-iscapture="true" to your tooltip target. I'm not sure what other implications this has, though.

aronhelser added a commit that referenced this issue Apr 17, 2018
use data-is-capture so the scroll events are paid attention to.

fix #248, re #291
@aronhelser
Copy link
Collaborator

🎉 This issue has been resolved in version 3.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@thomashibbard
Copy link

thomashibbard commented Jun 7, 2018

@aronhelser As of 3.6.0, this is still not working for me by adding the attributes data-scroll-hide on the tooltip and scrollHide on the ReactTooltip component. Unless the intention is that it waits until scrolling is stopped before the tooltip is removed.


Ah, I see it is only failing to work when you set a delayHide. Is this a bug?

@aronhelser
Copy link
Collaborator

I'm not sure I understand, but it could be. What behavior do you expect if you set both delayHide and scrollHide? Based on the behavior of the tooltip in the "Theme and Delay" section of the demo (http://wwayne.com/react-tooltip/) I think the tooltip hanging around for the delay after a scroll is the expected behavior.

@thomashibbard
Copy link

@aronhelser I wouldn't think so. If a user scrolls down the page for several seconds (slowly, or it's a large page) the tooltip will remain positioned in its static position on the page for the entire time. It's really odd looking (ie, looks buggy) to just have it hanging out there for the entire duration of the scroll. For me it should disappear after scroll-start + delay, or have its own delay entirely.

@aronhelser
Copy link
Collaborator

aronhelser commented Jun 8, 2018 via email

@essaji
Copy link

essaji commented Jul 24, 2018

I am still facing this issue in 3.6.1

@yarik-vv
Copy link

yarik-vv commented Feb 1, 2019

We are still see this issue in v3.9.2.

@umihui
Copy link

umihui commented Apr 12, 2019

I am still see this issue in v3.10.0 if I set delayHide

Ah, I see it is only failing to work when you set a delayHide. Is this a bug?

@kashifshamaz21
Copy link

I think this issue arising due to combination of delayHide and scroll is being tracked under #474, for others who stumble here on this issue for this, lets use Issue 474 for adding comments, up-voting and further analysis/PR.

@filipkowal
Copy link

filipkowal commented Dec 7, 2021

Based on a comment in #291, there is a work-around. add data-iscapture="true" to your tooltip target. I'm not sure what other implications this has, though.

If the event target is an SVG, the tooltip will appear only on hovering over the strokes.
Can easily be fixed:

  svg {
    pointer-events: all;
  }

@judict
Copy link

judict commented May 31, 2022

The issue is still there, even on desktop.

@emre-ozgun
Copy link

I'm experiencing this issue on desktop as well. v4.2.21 - super vexing since I rely heavily on z-index manipulation so not being able to hide on scroll would hinder our users' experience.

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

Successfully merging a pull request may close this issue.