Google Sheet Embed post in topic always jumps to focus

AI-generated summary

Google Sheet Embed Post Issue: When a Google Sheet is embedded in a post, the page jumps to focus on that post every time it’s loaded, even if it’s not the most recent post. keith1 reported this issue in a 38-post topic where the sheet is embedded in post #4. According to dax, this is a known bug that was never fixed and is documented in the plugin_discourse_spreadsheet GitHub page. A workaround suggested by codinghorror is to put a space in front of the URL to prevent embedding. However, techAPJ noted that Google Docs oneboxes now only show fancy links and metadata, making this workaround less relevant.

I wish I could link directly to the example, but it’s part of an admin category. Anyway, here’s the problem:

One of my moderators posted a google sheet, which embedded beautifully, then conversation when on. Every time I return to that topic, it loads the page correctly to the bottom for a brief second, then once the sheet gets loaded, the page scrolls back up to it and focuses on that post.

My current topic is 38 posts long, with the sheet on post #4, so it’s quite noticable.

Again, I’m sorry I can’t point you to a repro - if I have time soon I’ll try to make one quickly.

1 Like

It’s an old bug never fixed.
Look “Known issues”
https://github.com/tcreativo/plugin_discourse_spreadsheet

If I correctly remember this plugin was merged in Discourse 2 years ago.

1 Like

The workaround is to put a space in front of the URL so it does not embed / onebox. Google Doc oneboxes are rather broken.

4 Likes

Ah, fair enough. Thanks!

Not relevant anymore since Google Docs onebox will now just show fancy link and metadata. Demo here:

4 Likes