sticky-kit icon indicating copy to clipboard operation
sticky-kit copied to clipboard

In Safari, doc.height() is always 1 pixel more than last_scroll_height

Open jsit opened this issue 7 years ago • 2 comments

No idea why this is happening, but it results in the .is_stuck class being removed and re-added on every little scroll event. I changed line 119 (within the tick() function) to read:

if (!recalced && Math.abs(doc.height() - last_scroll_height) > 1) {

And it works.

Safari 10.0.2.

jsit avatar Jan 22 '17 22:01 jsit

Thank you!

carasmo avatar Oct 02 '17 13:10 carasmo

yeah, very strange bug... But actually safari also very strange browser )

TrilipuT avatar Oct 24 '17 07:10 TrilipuT