Device-Bugs icon indicating copy to clipboard operation
Device-Bugs copied to clipboard

iOS 8-9 reports incorrect values from getBoundingClientRect on elements with fixed position while scrolling

Open emilbjorklund opened this issue 10 years ago • 1 comments
trafficstars

iOS8-9 (so far) report the top value after a getBoundingClientRect() call similar to if the element was positioned absolutely during scroll. Some time after the scroll, the reported value reverts to the correct measurement – albeit tests indicate the value sometimes is 1 pixel off (!). This breaks e.g. fixed-fixed and Kangax's feature detection of fixed positioning

Demo: http://jsbin.com/dugaqa/25/edit?html,css,js,output Demo of debouncing, to show the value after scroll "settles": http://jsbin.com/dugaqa/21/edit?html,css,js,output

Bug is reported to Apple.

emilbjorklund avatar Sep 27 '15 09:09 emilbjorklund

OpenRadar bug: https://openradar.appspot.com/radar?id=6668472289329152

emilbjorklund avatar Sep 29 '15 07:09 emilbjorklund