From e754cc70ed4497e1e3d572a9bfac7000af13f47a Mon Sep 17 00:00:00 2001 From: bordun Date: Thu, 19 Nov 2020 08:36:07 +0100 Subject: [PATCH] editor: bypass mod+x mod+c & mod+v when some text is selected --- src/client/editor/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/editor/index.js b/src/client/editor/index.js index a4bce9f9..5526a39a 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -219,15 +219,15 @@ class Editor { break case 'mod + c': - this.copyWidget() + if (!window.getSelection().toString().length) this.copyWidget() break case 'mod + x': - this.cutWidget() + if (!window.getSelection().toString().length) this.cutWidget() break case 'mod + v': - this.pasteWidget(this.mousePosition.x, this.mousePosition.y, false) + if (!window.getSelection().toString().length) this.pasteWidget(this.mousePosition.x, this.mousePosition.y, false) break case 'mod + shift + v':