vitejs / vitejs/launch-editor

Empty browser window/tab is left after opening `__open-in-editor` link from JS console/terminal.

Open
#89 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
721
Forks
94
Avg merge
2h 11m
Merged PRs (30d)
5

Description

A side effect of opening an __open-in-editor link from the terminal/console is an empty browser window is left opened.

To reproduce:

  1. Start vite dev server on port 5173
  2. Paste http://localhost:5173/__open-in-editor?file=/ into browser JS console.
  3. Click resulting link.

May also echo link to terminal and CTRL+click the link.

Work-around:

Context:

I wrote a utility function that outputs the __open-in-editor link for the file it was called from.

Image

Image

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

Reproduce the issue by starting the Vite dev server and opening the documented __open-in-editor URL from a browser console or terminal. Compare the behavior with the linked custom plugin's src/lib/open-in-editor.ts, then verify that the middleware response closes the empty browser window without breaking editor opening.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.