mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 19:52:32 +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:
committed by
GitHub
parent
2d901f6520
commit
1d9a7fa01d
@@ -96,6 +96,7 @@ const withShortcuts = editor => {
|
|||||||
if (block.type === 'list-item') {
|
if (block.type === 'list-item') {
|
||||||
Transforms.unwrapNodes(editor, {
|
Transforms.unwrapNodes(editor, {
|
||||||
match: n => n.type === 'bulleted-list',
|
match: n => n.type === 'bulleted-list',
|
||||||
|
split: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user