racket/scribble

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

オープン

#112 opened on 2017/05/17

 (1 件のコメント) (1 件のリアクション) (0 人の担当者)Racket (102 件のフォーク)github user discovery
good first issue

Repository metrics

Stars
 (250 個のスター)
PR merge metrics
 (平均マージ 12h 51m) (30d で 1 merged 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)

コントリビューターガイド