dont add focus and blur transactions to history

This commit is contained in:
Philipp Kühn 2020-12-01 21:58:29 +01:00
parent 5ae9d8cca4
commit 30d5ab5f39

View File

@ -16,7 +16,10 @@ export const FocusEvents = Extension.create({
focus: (view, event) => {
editor.isFocused = true
const transaction = editor.state.tr.setMeta('focus', { event })
const transaction = editor.state.tr
.setMeta('focus', { event })
.setMeta('addToHistory', false)
view.dispatch(transaction)
return true
@ -24,7 +27,10 @@ export const FocusEvents = Extension.create({
blur: (view, event) => {
editor.isFocused = false
const transaction = editor.state.tr.setMeta('blur', { event })
const transaction = editor.state.tr
.setMeta('blur', { event })
.setMeta('addToHistory', false)
view.dispatch(transaction)
return true