0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Ignore "cut" if no selection

This commit is contained in:
Neil Jenkins 2017-01-09 14:25:34 +11:00
parent e645489f5f
commit 066bdd2cde
3 changed files with 14 additions and 2 deletions

View file

@ -2165,6 +2165,12 @@ var onCut = function ( event ) {
var root = this._root;
var self = this;
// Nothing to do
if ( range.collapsed ) {
event.preventDefault();
return;
}
// Save undo checkpoint
this.saveUndoState( range );

File diff suppressed because one or more lines are too long

View file

@ -38,6 +38,12 @@ var onCut = function ( event ) {
var root = this._root;
var self = this;
// Nothing to do
if ( range.collapsed ) {
event.preventDefault();
return;
}
// Save undo checkpoint
this.saveUndoState( range );