SOLVED: Reloading page with an anchor link doesn't jump to its location

Bricks Version: 1.5
Browser: Firefox 103.0.2
OS: Windows 10
URL: Screencast demonstrating the issue

When refreshing a page that is anchored to an id (i.e. with a hash # in the URL) by pressing F5, Bricks doesn’t jump to its designated location. If I continue pressing F5, the page reload just a little bit over every time—for reference, in the screencast linked above I start pressing F5 around the 00:14 sec mark. I recorded what happens both in Bricks and Oxygen for you to note the difference in behavior.

Hi Lucas,
Thanks for reaching out!

Why this works in your direct example in O I can’t say, however it doesn’t even work on the official O website like in your example (at least not in Chrome). If you search for the “problem” on google (regardless of the builder), you’ll find lots of entries about it - so from my point of view this is not a bug, but “normal” browser behavior.

Best regards,
timmse

1 Like

Hi timmse,

After digging a bit further I think I partially understood what’s happening. The page moving a chunk higher after every F5 push seems to be caused by the Wordpress admin bar (when disabling the bar, the page built with Bricks instantly loads in the same position: see video). Apparently even when directly accessing an URL with an anchor (e.g. staging.scriba.school/test-page/#aula ), instead of going to the appointed location it goes 32px above it—which is the height of the admin bar.

I assume Oxygen reloads pages differently when pressing F5 (acting as a hard reload I guess), that’s why it goes to the # anchor instead of the user last location. When pressing Ctrl+F5 in the page built with Bricks it also goes to the # anchor.

I think Bricks does a good job reloading pages as it is, so I’ll probably just disable the WP admin bar for non-admin users and no one will even notice that weird offset of 32px. Thanks for replying.

1 Like