Comments (10)
@elias-fadeyev Did you try to play with usePortal/portalContainer props? Tooltip can be attached to the draggable element instead of the document body. In this case, it should move with the appropriate container.
from react-popper-tooltip.
Please try out v2.8.2 which has a potential fix.
from react-popper-tooltip.
Now it works, thank you!
As a related issue, is it possible to change click
listener to mousedown
for outsideClickHandler
? We use this tooltip inside a drag'n'drop container and, if we move the container, outsideClickHandler
doesn't trigger and, as a result, the tooltip stays shown outside of the container.
from react-popper-tooltip.
Does it close when you drop the container?
from react-popper-tooltip.
No, in our case click
is not triggered after dropping and it stays opened, only mouseup
is fired.
from react-popper-tooltip.
I attach a click
handler to document
to handle outside click, whenever the tooltip opens. Do you know how is that not triggered? Is your mouseup
or mousedown
handler stopping propagation to the click handler? Basically, what I mean is that the outside click mechanism should just work irrespective of what drag action you are doing because click event is always triggered.
from react-popper-tooltip.
Yep, we are using react-sortablejs
and it seems that it stops propagation inside mouseup
handler, if an order of elements has been changed. That's why we don't have click
event now, but I think it's not a big deal. I mean isn't it a strange behavior of a tooltip to stay at the same place, when the container is moved to an opposite side of the window, even if it will be hidden after that?
from react-popper-tooltip.
@denisborovikov. Agree, but then this tooltip will be restricted to have the body only inside the container. It won't work for a big tooltip.
from react-popper-tooltip.
@elias-fadeyev Does outer container have overflow: hidden
? You can try to apply overflow
on the inner part of the draggable element so the mutual wrapper won't cut the tooltip.
from react-popper-tooltip.
@denisborovikov my fault, you are absolutely right! Unfortunately, a big tooltip now works as a handle and I can use it to drag'n'drop the container, as a part of it) I'll try to find the solution for preventing this behavior. Thank you
from react-popper-tooltip.
Related Issues (20)
- display: none on tooltip arrow HOT 2
- Version 4.X.X isn't supported in Shadow DOM. HOT 7
- Tooltip does not disappear when fast hovering over multiple setTriggerRef divs. HOT 10
- Keep tooltip open on mousedown/up and etc when trigger='click' and interactive=true HOT 1
- Unable to stop propogation in react-tooltip HOT 4
- Type check error with Typescript 4.4 exactOptionalPropertyTypes HOT 5
- `getTriggerRef` invoking with null HOT 1
- react-popper-tooltip has no exported member "usePopperTooltip" HOT 1
- Typescript error when using `getTooltipProps` in a div HOT 3
- don't close on losing hover HOT 5
- Handling focus outside
- Focus + interactive HOT 2
- Horizontal scrollbar appears, tooltip is cropped HOT 2
- React testing library hover event not triggered when trigger text if wrapper with additional element HOT 2
- Is not possible to pass a strategy HOT 4
- floating-ui version of the lib HOT 1
- Custom styles for "tooltip-container" HOT 1
- Can't disable preventOverflow modifier
- Placement is not working properly in tables HOT 6
- Support for newer versions of react
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-popper-tooltip.