mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 05:48:59 +08:00
refactor(editor): remove selection global types (#9532)
Closes: [BS-2217](https://linear.app/affine-design/issue/BS-2217/remove-global-types-in-selection)
This commit is contained in:
@@ -2,7 +2,7 @@ import {
|
||||
getNextContentBlock,
|
||||
matchFlavours,
|
||||
} from '@blocksuite/affine-shared/utils';
|
||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||
import { type BlockStdScope, TextSelection } from '@blocksuite/block-std';
|
||||
import type { Text } from '@blocksuite/store';
|
||||
|
||||
// When deleting at line end of a list block,
|
||||
@@ -20,7 +20,7 @@ import type { Text } from '@blocksuite/store';
|
||||
- Line9
|
||||
*/
|
||||
export function forwardDelete(std: BlockStdScope): true | undefined {
|
||||
const text = std.selection.find('text');
|
||||
const text = std.selection.find(TextSelection);
|
||||
if (!text) return;
|
||||
const isCollapsed = text.isCollapsed();
|
||||
const doc = std.doc;
|
||||
|
||||
Reference in New Issue
Block a user