WordPress / WordPress/contributor-toolkit
Links can open inside the app instead of the browser
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 36
- Forks
- 13
- Avg merge
- 23h 19m
- Merged PRs (30d)
- 72
Description
What problem does this address?
The site page links out to the running site, to wp-admin, and to the database browser. A plain click opens them in the contributor's own browser, which is the intent.
A middle click, or Cmd/Ctrl+click, does not. Those never reach the handler that redirects the link, so the page loads inside a window of the app instead: no address bar, no back button, and no way to tell it apart from the app's own screens. The contributor ends up browsing their site inside the toolkit without having asked for it, and the only way out is to close the window.
This is not a security hole — the window that opens does not carry the app's privileged bridge, so nothing in that page can reach the app. It is a correctness problem.
The reason it happens is that each link cancels its own navigation. That works for the one gesture the link author thought about, and every new link has to remember to do the same thing.
What is your proposed solution?
Refuse navigation and window creation once, for the app window as a whole, and hand the URL to the system browser instead. Every link is then covered by default, including ones added later, and the individual links no longer carry the responsibility.
Worth checking the same gestures on every other link in the app while doing this, not just the three on the site page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the current navigation handlers for the site, wp-admin, and database-browser links, then trace how the app window handles ordinary, middle, and Cmd/Ctrl-click gestures. Check the same gestures on the other app links; done means every external URL opens in the system browser without loading inside an app window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100