racket/scribble

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

Aperta

#112 aperta il 17 mag 2017

 (1 commento) (1 reazione) (0 assegnatari)Racket (102 fork)github user discovery
good first issue

Metriche repository

Star
 (250 stelle)
Metriche merge PR
 (Merge medio 12h 51m) (1 PR mergiata in 30 g)

Descrizione

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)

Guida contributor