You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for opening an issue. We discussed this in the meeting. Our logic in offsetParent ignores offset parents that are table, th, td as well as parents with transforms. We're pondering whether we can simplify that and fully rely on native offsetParent in all browsers. That would be a breaking change and likely not something we could do until 5.0.
However, aligning with the spec would not change your particular use case. We do think 0, 0 is correct here as position is relative to the offsetParent and the child element is 0, 0, away from main. Granted, it arrived at the right solution the wrong way.
Bug Reports:
JQuery with version higest then 3.2.1 wrong calculated position. transform: translate values not participate in calculations
jquery version > 3.2.1:
$('.child').position() -> {top: 0, left: 0} - this is wrong position
jquery version <= 3.2.1:
$('.child').position() -> {top: 11, left: 562} - this is right position
Code exemple:
The text was updated successfully, but these errors were encountered: