dont add focus and blur transactions to history
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user