racket/scribble

Ctrl+Click on the "top" link does not open in a new tab (local docs only)

開放

#112 建立於 2017年5月17日

 (1 則留言) (1 個反應) (0 位負責人)Racket (102 個分叉)github user discovery
good first issue

倉庫指標

星標
 (250 顆星)
PR 合併指標
 (平均合併 12小時 51分鐘) (30 天內合併 1 個 PR)

描述

When viewing the locally-installed documentation, doing a middle click or Ctrl+Click on the "top" link in the top left corner of the sidebar opens the main page of the documentation, but not in a new tab.

The element seems to have an onclick handler:

onclick="return GotoPLTRoot("6.9.0.1");

Most likely this is the cause of the problem. I suspect the onclick handler should not attempt to set location.href, but instead should change the URL of the link on the fly, and return true to let the default event handler take place (if my knowledge of JavaScript quirks is not too rusty).

Another symptom of this bug is that performing a right-click → open link in new tab or open link in new window will open a non-existant location. I suspect the onclick handler should therefore also be executed on right click, and on focus (for keyboard navigation), and/or if possible, directly when the DOM is loaded, so that it can patch the link early on.

Browser: Chromium Version 55.0.2883.87 (64-bit)

貢獻者指南