uiwjs / uiwjs/react-md-editor

Editor forces window reload

Open
#212 7 comments 0 reactions 0 assignees View on GitHub

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;

Create-next-app-example-forked-CodeSandbox

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.