It seems that embedding Google docs results in a page scrolling automatically to top.
I was only able to reproduce this on all latest browsers on Yosemite. It does not happen always (but still in a majority of tries) and seems to be based on how quickly the embedded content loads.
Steps to repro:
create a post below the page fold with a link to Google spreadsheet
get the persistent link to the post and open the page
the page should load and be correctly scrolled (embedded content not loaded yet)
embedded content loads and another scroll is triggered
What should happen is the page should be scrolled to correct position.
Instead the page is scrolled to the top of the page currently loaded (not the first post if the thread is long).
Demo: open in new tab, clicking it would not result in reload and the bug would not trigger
Yes, any embed that has variable height will completely screw up positioning in the stream. There is no way around this unless the embed has a guaranteed height.
Fair enough, but I’d say the original scroll position is correct; why is a second scroll called when onebox loads? Omitting the second scroll would solve this particular issue of random scroll to the top of the page, wouldn’t it?
No idea, depends on the embed api. We found that Twitter did return the size of images in tweets so that became possible. Size of embed is critical to us. Variable height embeds are a total no-go in the post stream; they have catastrophic, and cascading effects.