mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 19:59:02 +08:00
dont add focus and blur transactions to history
This commit is contained in:
parent
5ae9d8cca4
commit
30d5ab5f39
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user