mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-08-06 13:38:49 +08:00
prevent dispatch on readonly
This commit is contained in:
parent
a70e6ae3cd
commit
d0a15ad069
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user