Skip to content

Commit

Permalink
fix: Text Formatting Effects Reset After Input Confirmation with Japa…
Browse files Browse the repository at this point in the history
…nese IME on Mobile Browsers (Safari & Chrome)
  • Loading branch information
agata committed Jan 18, 2025
1 parent 839eb47 commit fc2cc1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/extensions/keymap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export const Keymap = Extension.create({
new Plugin({
key: new PluginKey('clearDocument'),
appendTransaction: (transactions, oldState, newState) => {
if (transactions.some(tr => tr.getMeta('composition'))) {
return
}

const docChanges = transactions.some(transaction => transaction.docChanged)
&& !oldState.doc.eq(newState.doc)

Expand Down

0 comments on commit fc2cc1a

Please sign in to comment.