prevent dispatch on readonly

This commit is contained in:
Philipp Kühn 2021-03-15 13:27:52 +01:00
parent a70e6ae3cd
commit d0a15ad069

View File

@ -302,6 +302,10 @@ export class Editor extends EventEmitter {
* @param transaction An editor state transaction
*/
private dispatchTransaction(transaction: Transaction): void {
if (transaction.docChanged && !this.isEditable) {
return
}
if (this.isCapturingTransaction) {
if (!this.capturedTransaction) {
this.capturedTransaction = transaction