Skip to content

Commit a44a7c3

Browse files
authoredJan 21, 2025··
fix(core): do not reset marks, or nodes when using IME on mobile devices #5733 (#6033)
1 parent 40b7d47 commit a44a7c3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 

‎.changeset/perfect-pillows-rhyme.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tiptap/core": patch
3+
---
4+
5+
fix(core): do not reset marks, or nodes when using IME on mobile devices

‎packages/core/src/extensions/keymap.ts

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ export const Keymap = Extension.create({
104104
new Plugin({
105105
key: new PluginKey('clearDocument'),
106106
appendTransaction: (transactions, oldState, newState) => {
107+
if (transactions.some(tr => tr.getMeta('composition'))) {
108+
return
109+
}
110+
107111
const docChanges = transactions.some(transaction => transaction.docChanged)
108112
&& !oldState.doc.eq(newState.doc)
109113

0 commit comments

Comments
 (0)
Please sign in to comment.