CompositionInput: Properly set cursor right after pasted data
This commit is contained in:
parent
99011b0a56
commit
afae6bc267
1 changed files with 3 additions and 3 deletions
|
@ -38,8 +38,6 @@ export class SignalClipboard {
|
|||
return;
|
||||
}
|
||||
|
||||
this.quill.focus();
|
||||
|
||||
const clipboard = this.quill.getModule('clipboard');
|
||||
const selection = this.quill.getSelection();
|
||||
|
||||
|
@ -72,8 +70,10 @@ export class SignalClipboard {
|
|||
.delete(selection.length)
|
||||
.concat(clipboardDelta);
|
||||
this.quill.updateContents(delta, 'user');
|
||||
this.quill.setSelection(delta.length(), 0, 'silent');
|
||||
this.quill.setSelection(delta.length() - selection.length, 0, 'silent');
|
||||
this.quill.scrollingContainer.scrollTop = scrollTop;
|
||||
|
||||
this.quill.focus();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue