tether icon indicating copy to clipboard operation
tether copied to clipboard

Placement: top with dynamically changing content moves off screen on resize

Open salminio opened this issue 8 years ago • 2 comments

My project is creating a popover with content that is a little interactive and can shrink or grow in size. When that happens sometimes the popover miscalculates the positions and either has a box really large starting offscreen with a negative xPos or totally offscreen (again with a negative xPos). In looking into the code, during move it somehow thinks the positioning is now fixed because the top location is not in the history check and thus it skips a check and moves into an else clause that forces 'fixed' position...

https://github.com/HubSpot/tether/blob/master/src/js/tether.js#L738

If I comment out that code, everything works (probably because I have no fixed content).

I was wondering if Tether could combine the scrollParent checking which can detect a fixed position and set a flag to know that fixed position is part of the equation and only do the fixed check if that flag is set?

salminio avatar Mar 15 '17 14:03 salminio

Did you ever find a resolution to this?

justinwinslow avatar May 28 '19 19:05 justinwinslow

it is no longer an issue for us... Don't 100% remember the series of events that fixed it, but I believe we moved up in version of bootstrap and I think we switched to using boundary: 'window'

salminio avatar May 29 '19 10:05 salminio