Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor forces window reload #212

Open
rafaelguedes opened this issue Jul 23, 2021 · 7 comments
Open

Editor forces window reload #212

rafaelguedes opened this issue Jul 23, 2021 · 7 comments

Comments

@rafaelguedes
Copy link

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

@jaywcjlove
Copy link
Member

I don't know how to deal with this problem. I don't know how it was caused.

@rafaelguedes

@rafaelguedes
Copy link
Author

rafaelguedes commented Jul 23, 2021

Can you, please, try to find what might be causing it? I believe it should be fixed.

@jaywcjlove
Copy link
Member

The problem did not reproduce on macOS. Maybe I need to find a windows test.

@rafaelguedes
Copy link
Author

rafaelguedes commented Jul 23, 2021

That gif, that shows the issue, was taken on macOS. The issue do reproduce on macOS.

@rafaelguedes
Copy link
Author

@jaywcjlove, do you plan to try to find the cause of this issue?

@jaywcjlove
Copy link
Member

@rafaelguedes Well, yes, I will try to reproduce it when I have time.

@jaywcjlove
Copy link
Member

This may be caused by dependency on react-markdown.

There is no problem in the production environment.

It cannot be resolved at this time.

@rafaelguedes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants