@@ -2,6 +2,7 @@ import type { BaseSelection, BlockModel } from '@blocksuite/store';
|
|||||||
import throttle from 'lodash-es/throttle';
|
import throttle from 'lodash-es/throttle';
|
||||||
|
|
||||||
import { TextSelection } from '../../selection/index.js';
|
import { TextSelection } from '../../selection/index.js';
|
||||||
|
import { EditorHost } from '../../view/index.js';
|
||||||
import { isActiveInEditor } from './active.js';
|
import { isActiveInEditor } from './active.js';
|
||||||
import { RANGE_SYNC_EXCLUDE_ATTR } from './consts.js';
|
import { RANGE_SYNC_EXCLUDE_ATTR } from './consts.js';
|
||||||
import type { RangeManager } from './range-manager.js';
|
import type { RangeManager } from './range-manager.js';
|
||||||
@@ -191,6 +192,11 @@ export class RangeBinding {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// From legacy render lit portal
|
||||||
|
if (range.commonAncestorContainer instanceof EditorHost) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// range is in a non-editable element
|
// range is in a non-editable element
|
||||||
// ex. placeholder
|
// ex. placeholder
|
||||||
const isRangeOutNotEditable =
|
const isRangeOutNotEditable =
|
||||||
|
|||||||
Reference in New Issue
Block a user