Comments (6)
I think the solution should not close the issue. It looks like a workaround that "fixes" a problem with eventOff="blur scroll"
from react-tooltip.
The tooltip can be configured to hide or not on scroll. Take a look at the example page for Scrolling.
from react-tooltip.
To use with react-windowed-list
import WindowedList from 'react-windowed-list';
import ReactTooltip from 'react-tooltip';
import { useThrottledFn } from 'beautiful-react-hooks';
const tooltipRefresh = useThrottledFn(
() => {
ReactTooltip.hide();
ReactTooltip.rebuild();
},
500,
null,
[],
);
const renderItem = useCallback(index => {
tooltipRefresh();
return <>
...
<ReactTooltip />
<WindowedList
from react-tooltip.
It's pretty easy to handle this bug but i think is not a good behaviour.
anyway this solves the problem:
componentDidMount: function() {
window.addEventListener("scroll", this.hideTooltip);
},
componentWillUnmount: function() {
window.removeEventListener("scroll", this.hideTooltip);
},
hideTooltip: function() {
ReactTooltip.hide();
}
from react-tooltip.
@scerelli
Thanks, just added scroll event listener when tooltip show and remove the listener after tooltip hide.
Sometimes the hide action is triggered late, I think it may have something to do with the mechanism of the browser's scroll(or maybe just because my computer is slow...), anyway, I think it's ok
from react-tooltip.
I had a problem similar to this, but after further debugging, project that I was working had no window scroll, only element scroll. so none of the solutions above worked.
I managed to fix? it by adding 'onScroll' event on the element that was scrolling
example:
public hideUpdateTooltip = () => {
Tooltip.hide()
}
<div onScroll={this.hideUpdateTooltip}>
//some codes...
</div>
from react-tooltip.
Related Issues (20)
- [BUG] Strings are not escaped properly HOT 2
- [BUG] when i zoom out or in the big screen resolutions the tooltip is not in right place HOT 3
- Can't import the named export 'arrow' from non EcmaScript module (only default export is available) HOT 7
- [BUG] openEvents does not work with "click" HOT 4
- Is is possible to export default middlewares? HOT 1
- [BUG] Testing react-tooltip with modal result to a failed HOT 1
- [BUG] Tooltip shows briefly when using delayShow and moving to directly adjacent element HOT 3
- [FEAT REQ] Render tooltips inside portal HOT 4
- [BUG] CSP breaks, styles are injected even after disableStyleInjection is used HOT 2
- The component doesn't show the tooltip when there is a single quote " ' " in the data-tooltip-id and the id passed on the Tooltip component. HOT 2
- Safari mobile browser gets the error e.getAttributeNames HOT 2
- [BUG] : When ' (single quote) is used any where in the text, the tooltip doesn't open HOT 4
- I have set opacity to 1 but I can still see though HOT 3
- [BUG] HOT 2
- [BUG] anchor element does not close the tooltip on click HOT 3
- [BUG] #1042 Regression from 5.26.0 → 5.26.1 HOT 1
- Tooltip is not working HOT 2
- [BUG] Element with id 'react-tooltip-base-styles' already exists
- if message is long, how to make message's tooltip showing next to chat box HOT 5
- The tooltip is hidden by the parent tag using overflow-auto HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-tooltip.