editor: bypass mod+x mod+c & mod+v when some text is selected

This commit is contained in:
bordun 2020-11-19 08:36:07 +01:00
parent 5979a8350d
commit e754cc70ed

View file

@ -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':