mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-10 11:24:10 -04:00
When the screen resizes, the dimensions of our elements may change so we run `setElementDimensions` again to update our store of those values. This caused a bug with the stored position of stuck elements. When stuck, elements are 'fixed' so their position is relative to the window position. We need the value stored to be from the position in the document flow, not the 'fixed' value. This change means, when an element is stuck, we check its shim for the position instead. The shim occupies the space the element would do in the page so it makes sense to use it for this.