a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix bug w/ focus block on end

+10 -8
+10 -8
app/[doc_id]/Blocks.tsx
··· 225 225 nextBlock.view.focus(); 226 226 let nextBlockViewClientRect = nextBlock.view.dom.getBoundingClientRect(); 227 227 let tr = nextBlock.editor.tr; 228 - if (left === "end") left = tr.doc.content.size - 1; 229 - let pos = nextBlock.view.posAtCoords({ 230 - top: 231 - top === "top" 232 - ? nextBlockViewClientRect.top + 5 233 - : nextBlockViewClientRect.bottom - 5, 234 - left, 235 - }); 228 + let pos = 229 + left === "end" 230 + ? { pos: tr.doc.content.size - 1 } 231 + : nextBlock.view.posAtCoords({ 232 + top: 233 + top === "top" 234 + ? nextBlockViewClientRect.top + 5 235 + : nextBlockViewClientRect.bottom - 5, 236 + left, 237 + }); 236 238 237 239 let newState = nextBlock.editor.apply( 238 240 tr.setSelection(TextSelection.create(tr.doc, pos?.pos || 0)),