question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
bez4piecicommented, Aug 8, 2017

+1 Any news on this?

1reaction
hekigancommented, Jul 5, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found