Tooltip.js: offset is never set (either with "offset" or "modifiers")
See original GitHub issue- Tooltip.js v1.1.4
- Popper.js v1.10.6
CodePen demo
https://codepen.io/hekigan/pen/GEyazB/?editors=1011
Steps to reproduce the problem
On the codepen above, you can see that the offset is never set.
{
...
offset: 100,
popperOptions: {
modifiers: {
offset: {
offset: 200
}
}
}
What is the expected behavior?
The tooltip should have shifted from the target element by ‘x’ pixels.
What went wrong?
No change whatsoever.
Any other comments?
I looked up in the ‘tooltip.js’ source code and I could not find where you set the offset and pass it on to ‘popper.js’. I did see that you merge the options object, but after that, it just does not seem to get used.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Tooltip.js: offset is never set (either with "offset" or "modifiers")
What is the expected behavior? The tooltip should have shifted from the target element by 'x' pixels. What went wrong? No change whatsoever....
Read more >React Popper. How to move element relatively parent?
I'm trying to move Popper that is inside parent component. How i can do it? I tried to use offset property in modifiers...
Read more >Popper (v1.×)
List of modifiers used to modify the offsets before they are applied to the popper. They provide most of the functionalities of Popper.js....
Read more >Building a simple tooltip component that never goes off screen
To open the tooltip, we use a class with a modifier (following BEM) tooltip--open . That switches the display property of the dropdown...
Read more >bootstrap.bundle.min.js.map - Google Git
node_modules/popper.js/dist/esm/popper.js","../. ... option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 Any news on this?
@vgavro Thank you for your reply. If you change the offset in the codepen above (first comment), there is no effect at all, even using
popperOptions.modifiers.offset.offset
form.So I am not really sure about what is happening. I looked up a bit under the hood, but did not have too much time to find out what to fix.
I am building a vue directive on top of your tooltip.js implementation and it is pretty helpful. When I have more time, I might do my own implementation directly with popper.js, but right now I am really tight time-wise 😃