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.

tippy doesn't position where I'd expect with large html content

See original GitHub issue

Bug description

I have single tippy element on a page (the red image is the button that the tippy is attached to.) Screen Shot 2019-05-22 at 2 14 08 PM

actual result: Screen Shot 2019-05-22 at 2 14 16 PM

expected result: Screen Shot 2019-05-22 at 2 21 54 PM

My config:

const button = document.createElement('button');
button.setAttribute('style', `
                position: absolute;
                left: 364px;
                top: 149px;
                border-radius: 26px;
                width: 32px;
                height: 32px;
                z-index: 1;
            `);
const config = {
    arrow: true,
    flipOnUpdate: true,
    interactive: true,
    boundary: 'viewport',
    theme: 'light-border',
    trigger: 'click',
    zIndex: 999999
};

tippyInstance = tippy(button, config);

const productDetail = document.createElement('div');
productDetail.innerHTML = `bunch of stuff in here to flesh out the tippy content`;

tippyInstance.setContent(productDetail);
document.body.appendChild(button);

Is this a bug, or am I mis-configuring this?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
atomikscommented, May 22, 2019

Maybe it’s the boundary: 'viewport'?

1reaction
atomikscommented, May 29, 2019

It’s a bug technically but since it’s not a core base-level option and it’s already covered by placement it’s not a priority for now… 🤪

Read more comments on GitHub >

github_iconTop Results From Across the Web

All Props | Tippy.js - GitHub Pages
Prop Default Description plugins Specify plugins to use. See Plugins for details. role "tooltip" Specifies the role attribute on the tippy element. zIndex 9999 Determines the...
Read more >
Tippy size is too big after scrolling - Stack Overflow
Controlling the size of your content: Put your tippy content ( html ) as a div with a class (e.g. <div class="my-tippy-content">content goes ......
Read more >
Popovers - Bootstrap
Popovers rely on the 3rd party library Popper.js for positioning. ... In practice, this is used to enable dynamic HTML content to have...
Read more >
Building a tooltip component - web.dev
In this post I want to share my thoughts on how to build a color-adaptive and accessible <tool-tip> custom element.
Read more >
Themes - Tippy.js
It is what Popper.js uses to position the tippy. You don't need to apply any styles to this element. tippy-tooltip is the actual...
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