Skip to content

Tether: Set max width/height only when it's needed

Administrator requested to merge vk/fix-bad-scroll-tooltip-size-calculation into main

Created by: vovakulikov

Context

Prior to this PR tether package always set max sizes to the floating element. This led to problems with overflow content in some corner cases in firefox and chrome. I suspect that for some reason (I'm still not sure why it happens) getBoundingClientRect returns not fully corrected values. This PR tweaks logic around setting max sizes in a way that if the floating element wasn't constrained tether logic doesn't set max values.

https://user-images.githubusercontent.com/18492575/150978250-e101f8b1-271e-4c5e-8b68-b8ff20a3de66.mov

Merge request reports

Loading