Skip to content


Tooltip Dynamic Repositioning Inaccuracies #365

ssanders opened this Issue · 4 comments

4 participants


I have been investigating this for some hours but getting nowhere and have no forum write access so will just post a new issue for now.

Tooltip's dynamic repositioning works pretty well, but at seemingly random but reproducible times, when the tooltip should dynamically reposition, instead the tooltip edge escapes the viewport, to the point of increasing the document scroll size.

I have set my default tooltip position to "bottom center," basically flipping the demo tooltip settings. I have two tooltip configs, based on size, with different tip classes.

I believe the correct dynamic config with tooltip default to bottom is "top: { direction: 'up', bounce: true }," but who knows really, and having no config seems to work identically.

This issue seems to exacerbate itself as the browser window size increases.


I changed lines 42-43 in tooltip.dynamic.js (1.2.5) to this; now it seems to work great:

        right <= el.offset().left + el.outerWidth(),                // right
        bottom <= el.offset().top + el.outerHeight(),           // bottom

Thanks for your solution, can you post some minimal html / js / css that would reproduce this problem? There seem to be a few issues around tooltip positioning and the more test cases the better!

@caolan caolan was assigned

I concur with the bug and the fix. outerWidth / outerHeight includes padding and border, which is correct behavior for calculating clipping.


Hi ssanders,

If you are still watching this:

I've checked over the code for 1.2.6 (and 1.2.7) - this seems to have been reverted back to:

right <= el.offset().left + el.width(),
bottom <= el.offset().top + el.height(),

...I'm not sure if this was done as part of another change, or if tooltip.dynamic.js hasn't been updated with changes from 1.2.5. I'm interested to see if this is still an issue for what will be 1.2.7? Could you please provide a JSFiddle with the issue, so we can see it in action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.