我想在ankie卡片中加入html锚点,但为什么不起作用?

<h2 id="w1">a</h2>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a href="#w1">b</a>

当点击下面的“b”链接时,为什么不能跳到“a”处

@dae This is catched by the “onclick handler needs to return false” error, but scrolling still doesn’t work automatically if we return True there instead. Maybe QtWebEngine doesn’t support that out of the box.

1 Like

This doesn’t work, because the base tag causes the relative link to resolve to “http://localhost:port/#anchor”. I don’t think it’s worth trying to support this until we can migrate the reviewer away from the current Python/legacyPageData approach.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.