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

Issues with slate.js markdown editor #5204

Closed
jasongrout opened this issue Feb 6, 2021 · 3 comments
Closed

Issues with slate.js markdown editor #5204

jasongrout opened this issue Feb 6, 2021 · 3 comments
Labels
A-firefox A-slate slatejs WYSIWYG editor I-bug

Comments

@jasongrout
Copy link
Contributor

jasongrout commented Feb 6, 2021

First, congratulations on launching the markdown editor! It seems very nice. I especially like the table and math editors.

Here are a few issues I noticed when playing with it (macOS Catalina, Firefox 85):

  • Pressing up or down arrow keys moves the cursor directly to the top or bottom of the document. I expect it to move up or down a single line instead.
  • The toolbar buttons for inserting links, images, or special characters show dialog boxes, but seem to do nothing after I fill out the dialog and submit it. Curiously, the cursor also moves to the top of the document when I submit the dialog box.
@williamstein williamstein added A-slate slatejs WYSIWYG editor I-bug A-firefox labels Feb 6, 2021
@williamstein
Copy link
Contributor

Just confirming that:

  1. I can reproduce this, and
  2. It is only a problem on Firefox. Both Safari and Chrome do not have this behavior.

I do not know if this is an upstream bug, since their demos run a significantly older version of slate.

@williamstein
Copy link
Contributor

Pressing up or down arrow keys moves the cursor directly to the top or bottom of the document.

This is not exactly what happens. More precisely the cursor keys work fine within a paragraph. The problem is when you try to move from one paragraph to the next.

OK, here is an upstream bug report for exactly this bug, but the strange thing is they observe it only on Chrome and Safari but NOT on Firefox: ianstormtaylor/slate#3977

williamstein added a commit that referenced this issue Feb 6, 2021
…ing where, rather than depending on focus (which doesn't work on firefox); this fixes part of #5204
@williamstein
Copy link
Contributor

OK, for the record, the root cause of both problems is windowing (for scalability to very long documents). The solution for now is to disable windowing always on Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-firefox A-slate slatejs WYSIWYG editor I-bug
Projects
None yet
Development

No branches or pull requests

2 participants