Anki Forums

Links to named anchors malfunction

<a href="#anchor">Jump</a><br>
Lots of text<br>
Some more text<br>
(etc)
<a name="anchor">You have arrived</a>

In Ankidroid, clicking the “Jump” link correctly scrolls down to the named anchor.

In Anki, clicking the link has no effect in the interface. anki-console reports, “onclick handler needs to return false”
Version 2.1.35 (84dcaa86)
Python 3.8.0 Qt 5.14.2 PyQt 5.14.2

In AnkiWeb, the presence of <base href="https://ankiuser.net/study/media/"> hijacks the intended path.

Workarounds involve Javascript (https://rogerkeays.com/blog/using-base-href-with-anchors or using the scrollIntoView method)

If you can fix it in a way that doesn’t cause a return of the original issue, a PR would be welcome: