a tool for shared writing and social publishing

fix enter breaking selected state in list item

+9 -3
+9 -3
components/Blocks/TextBlock/keymap.ts
··· 392 392 view?: EditorView, 393 393 ) => { 394 394 if (state.doc.textContent.startsWith("/")) return true; 395 + // Empty list item: just outdent, don't create a new block 396 + if ( 397 + propsRef.current.listData && 398 + propsRef.current.pageType !== "canvas" && 399 + state.doc.content.size <= 2 400 + ) { 401 + shifttab(propsRef, repRef)(); 402 + return true; 403 + } 395 404 let tr = state.tr; 396 405 let newContent = tr.doc.slice(state.selection.anchor); 397 406 tr.delete(state.selection.anchor, state.doc.content.size); ··· 451 460 return; 452 461 } 453 462 if (propsRef.current.listData) { 454 - if (state.doc.content.size <= 2) { 455 - return shifttab(propsRef, repRef)(); 456 - } 457 463 let createChild = 458 464 propsRef.current.nextBlock?.listData && 459 465 propsRef.current.nextBlock.listData.depth >