Editor forces window reload
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 201
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
The first time that the editor is loaded it's forcing a window reload.
This should be avoided since the reload will, as expected, creating various issues such as losing states.
Here is a sandbox displaying this issue.
https://codesandbox.io/s/create-next-app-example-forked-xm1jn
It's using two markdown editors for comparison purposes.
If you click in "Other editor" first, the app is not reloading and is working as expected; after this, if you click on "Uiwjs" the app will be reloaded and the console will log "APP WILL RELOAD" (triggered by beforeunload event).
- This only happens the first time you open the editor after booting the app (I believe that in the following the page is prefetched);
- I'm not sure if this happens in production, but at least in development mode it's an issue;

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 first-open behavior using the linked CodeSandbox, then trace the editor's initial-load path and the source of the beforeunload-triggering reload. The issue names no repository files or tests; done means opening the editor after boot no longer reloads the window or loses application state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100