onload vs ready

Created on 1 February 2024, 11 months ago

Problem/Motivation

When I load my page with an anchor in the URL, it happens (not consistently but pretty often) that the pages scrolls to the wrong place in the page. I guessed it might be because the anchors were loading before everyting is in place in the page and I confirmed that by modifying the module code.
In auto_anchors.js on line 79, I replaced $(document).ready(function() { with $(window).on('load', function() { and that fixed the issue.

Proposed resolution

I would suggest that the anchor are created after every element id loaded or maybe an option is offered for the user to choose when the anchor creation should be triggered.

Thanks!

Feature request
Status

Active

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024