mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
feat(hotkey): when text is selected, allow the default copy and paste behavior
This commit is contained in:
parent
4507e83d7d
commit
4e0b2fae5d
@ -277,6 +277,10 @@ export const builtinHotkey = (ctx: IPublicModelPluginContext) => {
|
|||||||
if (isFormEvent(e) || !doc) {
|
if (isFormEvent(e) || !doc) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const anchorValue = document.getSelection()?.anchorNode?.nodeValue;
|
||||||
|
if (anchorValue && typeof anchorValue === 'string') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
let selected = doc.selection.getTopNodes(true);
|
let selected = doc.selection.getTopNodes(true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user