Empty browser window/tab is left after opening `__open-in-editor` link from JS console/terminal.
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:
- Start vite dev server on port 5173
- Paste
http://localhost:5173/__open-in-editor?file=/into browser JS console. - Click resulting link.
May also echo link to terminal and CTRL+click the link.
Work-around:
- Install my custom vite plugin that writes
'<script>window.close()</script>'in response. - (I also added a short message in case JS is not enabled.)
- It would be nice if the internal
__open-in-editormiddleware did this by default.
Context:
I wrote a utility function that outputs the __open-in-editor link for the file it was called from.
Contributor guide
No contributing guide indexed for this repository
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
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