1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-01 03:11:44 +02:00

Fix for backspace press in list (#3533)

Made a fix for the fact that if you were standing in a <li> wrapped in an <ul> with no text and pressed backspace, the <ul> would go away while the <li>'s stay.
This commit is contained in:
Douwe den Blanken
2020-03-02 23:29:46 +01:00
committed by GitHub
parent 2d901f6520
commit 1d9a7fa01d

View File

@@ -96,6 +96,7 @@ const withShortcuts = editor => {
if (block.type === 'list-item') {
Transforms.unwrapNodes(editor, {
match: n => n.type === 'bulleted-list',
split: true,
})
}