racket / racket/scribble

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

Open
#112 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

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-clickopen 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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the local documentation sidebar and generated files for the "top" link and GotoPLTRoot handler, then reproduce the issue with middle-click and the context-menu new-tab action in Chromium. Done means the top link opens the documentation root correctly both from a normal click and when opened in a new tab or window.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.