I have a very complex html page and I added some bookmark bindings at different points. Anchors are as follows:
<a href="#foo bar">click here for foo bar</a> lorum ipsum etc <a name="foo bar">foo bar</a>
But when you click on them, nothing happens - the URL in the address bar does not change, and the page does not move.
If I take my anchors and put them on a simpler page, they will start working, so I think that something should somehow interfere with the navigation, but I canβt figure out how to nail it. I was wondering about a bug in javascript somewhere that canceled navigation, but there are thousands of javascript lines on the page, and I have not found anything suspicious yet.
The problem occurs in both Chrome and Firefox.
How can I debug this problem?
UPDATE: Could this be a CSS issue? target anchors are within the <div> with the CSS overflow:auto; property overflow:auto; . This causes the scrollbar to appear inside the div instead of the edge of the page - which does not match my plain text page.
UPDATE 2: overflow: auto does not break named anchors; tested with a simple example
source share