fi(wysiwyg): fix navigation
This commit is contained in:
@ -308,17 +308,6 @@ export class WysiwygKeyboardHandler {
|
||||
|
||||
const actualContent = blockComponent.getContent ? blockComponent.getContent() : target.textContent;
|
||||
|
||||
console.log('Backspace handler cursor position:', {
|
||||
blockId: block.id,
|
||||
storedBlockContent: block.content,
|
||||
actualDOMContent: actualContent,
|
||||
targetTextContent: target.textContent,
|
||||
cursorPos,
|
||||
isAtBeginning: cursorPos === 0,
|
||||
isStoredEmpty: block.content === '',
|
||||
isActuallyEmpty: actualContent === '' || actualContent.trim() === ''
|
||||
});
|
||||
|
||||
// Check if cursor is at the beginning of the block
|
||||
if (cursorPos === 0) {
|
||||
e.preventDefault();
|
||||
@ -675,12 +664,6 @@ export class WysiwygKeyboardHandler {
|
||||
e.preventDefault();
|
||||
const nonEditableTypes = ['divider', 'image', 'youtube', 'markdown', 'html', 'attachment'];
|
||||
const position = nonEditableTypes.includes(prevBlock.type) ? undefined : 'end';
|
||||
console.log('ArrowLeft: Navigating to previous block', {
|
||||
currentBlockId: block.id,
|
||||
prevBlockId: prevBlock.id,
|
||||
prevBlockType: prevBlock.type,
|
||||
focusPosition: position
|
||||
});
|
||||
await blockOps.focusBlock(prevBlock.id, position);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user