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

Multiple lines delete ends in unexplained behaviour #1854

Closed
1 task done
Angeall opened this issue Jan 9, 2020 · 2 comments · Fixed by #2835
Closed
1 task done

Multiple lines delete ends in unexplained behaviour #1854

Angeall opened this issue Jan 9, 2020 · 2 comments · Fixed by #2835
Labels
🔭 area/muya 🐛 bug Something isn't working

Comments

@Angeall
Copy link

Angeall commented Jan 9, 2020

Description

When you select multiple lines and delete them, the moment you click on another line makes everything disappear. Then, entering ESC just shows the content of the file again, with the previously deleted lines undeleted.

  • Can you reproduce the issue?

Steps to reproduce

  1. Select multiple lines, with a title in it
  2. Press delete again to align the next title
  3. Text should disappear
  4. Press ESC to view text again, but to see your deleted text back

Expected behavior:

The lines to be deleted and the text not disappearing.

Actual behavior:

The lines are undeleted (except the title for some reasons) and the text disappear for a moment

Link to an example:

marktext-bug

Versions

  • Mark Text: 0.16rc2 and 0.15.1
  • Operating system: Ubuntu 18.04
@Jocs
Copy link
Member

Jocs commented Feb 16, 2020

@fxha Can you reproduce this issue?

@fxha
Copy link
Contributor

fxha commented Feb 21, 2020

Stack Trace:

Based on v0.16.0-rc-2 (custom build), so rather rc-3.

Uncaught TypeError: Cannot read property 'nodeType' of null
    at getNodeAndOffset (/src/muya/lib/selection/index.js:416)
    at Object.setCursorRange (/src/muya/lib/selection/index.js:482)
    at _r.setCursor (/src/muya/lib/contentState/index.js:194)
    at _r.partialRender (/src/muya/lib/contentState/index.js:246)
    at _r.inputHandler (/src/muya/lib/contentState/inputCtrl.js:324)
    at HTMLDivElement.<anonymous> (/src/muya/lib/eventHandler/keyboard.js:203)

Uncaught TypeError: Cannot read property 'text' of null
    at _r.checkNeedRender (/src/muya/lib/contentState/updateCtrl.js:42)
    at HTMLDivElement.<anonymous> (/src/muya/lib/eventHandler/keyboard.js:269)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔭 area/muya 🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants