mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
fix: handle root block when indent
This commit is contained in:
@@ -173,7 +173,7 @@ export const BulletView = ({ block, editor }: CreateView) => {
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return tabBlock(block, isShiftKey);
|
||||
return tabBlock(editor, block, isShiftKey);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ export const NumberedView = ({ block, editor }: CreateView) => {
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
tabBlock(block, isShiftKey);
|
||||
tabBlock(editor, block, isShiftKey);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -211,7 +211,7 @@ export const TextView = ({
|
||||
block.firstCreateFlag = true;
|
||||
};
|
||||
const onTab: TextProps['handleTab'] = async ({ isShiftKey }) => {
|
||||
await tabBlock(block, isShiftKey);
|
||||
await tabBlock(editor, block, isShiftKey);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ export const TodoView = ({ block, editor }: CreateView) => {
|
||||
};
|
||||
|
||||
const on_tab: TextProps['handleTab'] = async ({ isShiftKey }) => {
|
||||
await tabBlock(block, isShiftKey);
|
||||
await tabBlock(editor, block, isShiftKey);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user