React-tooltip: scrollHide not hiding tooltip on mobile

Created on 30 Jan 2017  Â·  19Comments  Â·  Source: wwayne/react-tooltip

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.

Most helpful comment

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

All 19 comments

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

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

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.

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. :)

@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.

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>

This problem solved?

I believe so. Should I close the issue?

@ryanhca I see this bug in the current version.

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.

:tada: This issue has been resolved in version 3.5.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

@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?

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.

@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.

Can you file a new issue?

On Thu, Jun 7, 2018 at 5:59 PM, Thomas Hibbard notifications@github.com
wrote:

@aronhelser https://github.com/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.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wwayne/react-tooltip/issues/248#issuecomment-395579117,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS_pneOra_fh7iwHvkpVJ3aU2VHEWcXnks5t6aJYgaJpZM4Lx_LX
.

I am still facing this issue in 3.6.1

We are still see this issue in v3.9.2.

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?

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benbro picture benbro  Â·  3Comments

Joseppi83 picture Joseppi83  Â·  4Comments

kokill picture kokill  Â·  3Comments

abijames picture abijames  Â·  3Comments

lovetann picture lovetann  Â·  3Comments