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
A list with empty list item text throws an exception.
Steps to reproduce
Create a list with at least one empty list item. E.g:
- a
-
-
- d<cursor>
Click on the empty list item in preview mode
Check console error log
Expected behavior: [What you expected to happen]
No exception
Actual behavior: [What actually happened]
Uncaught TypeError: Cannot read property 'parentNode' of undefined
at findNearestParagraph (domManipulate.js?596c:17)
at Selection.getCursorRange (selection.js?eaba:771)
at ContentState.updateState (updateCtrl.js?27d0:296)
at HTMLDivElement.changeHandler (index.js?64a7:378)
### Scheidung
- Verschuldensscheidung
- Varianten:
- Allein
- Ueberwiegendes
- Gleichteilig
- Siehe Pflichten
- Zerruettungsscheidung
- Krankheit
- z.B. Ehemann wird zum Zombie, Ehemann wird sehr geisteskrank
- Trennung 3/6 Jahre getrennt von einander leben
-
@stefnotch Yes, that's true when switching from source code mode back the span inside li is missing.
Error message:
dom.js?956f:26 Uncaught TypeError: Cannot read property 'parentNode' of undefined
at findNearestParagraph (dom.js?956f:26)
at Selection.getCursorRange (index.js?d47e:771)
at ContentState.selectionChange (paragraphCtrl.js?6d3e:20)
at setTimeout (keyboard.js?a29c:52)
Activity
fix: marktext#441 marktext#451 empty list item has no paragraph
Jocs commentedon Aug 12, 2018
@fxha For some reasons, I only had time on weekends to check the issues and review code. So thank you!
fix: #441 #451 empty list item has no paragraph (#456)
stefnotch commentedon Oct 25, 2018
I can still reproduce this issue.
Test document:
fxha commentedon Oct 25, 2018
@stefnotch Yes, that's true when switching from source code mode back the
spaninsideliis missing.Error message:
Jocs commentedon Oct 25, 2018
@fxha @stefnotch This problem maybe caused by me, I have rewrite the
importMarkdownfunction. I'll fixed asap.fxha commentedon Oct 25, 2018
@Jocs You can look at my PR #456. You have to detect a empty list item and add a empty
spanelement.Jocs commentedon Oct 25, 2018
@fxha Ok, Thanks!
chore(security): remediate 25 Dependabot alerts (#4596)
fix: marktext#441 marktext#451 empty list item has no paragraph (mark…
fix: marktext#451 empty list item error