You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When switching from markdown to wysiwyg (or HTML for that matter), the cursor jumps to a different location, or the editor starts selecting text. It may even destroy the contents by inserting random characters (probably from the markers functions) and repeating existing text.
I'm not sure yet why that happens. To reproduce, certain conditions have to be met to trigger the bug.
Reproducer 1
Go to the demo, switch to markdown mode, place the cursor at the end of the line "Note that,".
Switch to HTML or wysiwyg mode: The cursor jumps to the end of the text.
Switch back to markdown: The cursor stays in position.
Switch to HTML or wysiwyg again: The editor selects text at the top.
Repeating the example by staying above the blockquote doesn't trigger the above, e.g. place the cursor somewhere in the paragraph "Creating links is merely a matter..." and repeat the steps: The cursor does not move.
But this is not limited to blockquotes, in fact, I don't think the blockquote itself is the problem but rather it messes with the HTML tags in markdown mode somehow. Try the following example:
Reproducer 2
Clear the editor, switch to wysiwyg mode.
Enter "example", press shift+enter to insert a line break, enter "123456" in the second line.
Place the cursor between chars 3 and 4 just entered.
Switch to markdown mode: The cursor stays in place.
Switch back to wysiwyg mode: The cursor moved to the end of the line.
Switch back to markdown mode: The cursor stays in place (end of the line).
Switch back to wysiwyg mode: The content of the line changes to 123456agfWoofmarkSelectionOpenMarkerbecbbaaadhcbheeffc with WoofmarkS selected, some inserted characters are random garbage.
When not using a line break (shift+enter) but a paragraph (just enter) in step 2, the problem does not occur.
I tried to debug this but I cannot find where things start to go crazy. Whatever variables I log to the console, their contents seem sane (except that InputState may contain a cursor position outside of the surrounding <p> tag).
The text was updated successfully, but these errors were encountered:
When switching from markdown to wysiwyg (or HTML for that matter), the cursor jumps to a different location, or the editor starts selecting text. It may even destroy the contents by inserting random characters (probably from the markers functions) and repeating existing text.
I'm not sure yet why that happens. To reproduce, certain conditions have to be met to trigger the bug.
Reproducer 1
Go to the demo, switch to markdown mode, place the cursor at the end of the line "Note that,".
Repeating the example by staying above the blockquote doesn't trigger the above, e.g. place the cursor somewhere in the paragraph "Creating links is merely a matter..." and repeat the steps: The cursor does not move.
But this is not limited to blockquotes, in fact, I don't think the blockquote itself is the problem but rather it messes with the HTML tags in markdown mode somehow. Try the following example:
Reproducer 2
123456agfWoofmarkSelectionOpenMarkerbecbbaaadhcbheeffc
withWoofmarkS
selected, some inserted characters are random garbage.When not using a line break (shift+enter) but a paragraph (just enter) in step 2, the problem does not occur.
I tried to debug this but I cannot find where things start to go crazy. Whatever variables I log to the console, their contents seem sane (except that InputState may contain a cursor position outside of the surrounding
<p>
tag).The text was updated successfully, but these errors were encountered: