From c3badf4846156ca52966037e9ee600b508674736 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Tue, 18 Oct 2022 10:23:47 +0500 Subject: [PATCH] editor: generate new patch for @tiptap/core --- ...-beta.181.patch => @tiptap+core+2.0.0-beta.199.patch} | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename packages/editor/patches/{@tiptap+core+2.0.0-beta.181.patch => @tiptap+core+2.0.0-beta.199.patch} (88%) diff --git a/packages/editor/patches/@tiptap+core+2.0.0-beta.181.patch b/packages/editor/patches/@tiptap+core+2.0.0-beta.199.patch similarity index 88% rename from packages/editor/patches/@tiptap+core+2.0.0-beta.181.patch rename to packages/editor/patches/@tiptap+core+2.0.0-beta.199.patch index 0161d6b83..421bd098b 100644 --- a/packages/editor/patches/@tiptap+core+2.0.0-beta.181.patch +++ b/packages/editor/patches/@tiptap+core+2.0.0-beta.199.patch @@ -1,8 +1,8 @@ diff --git a/node_modules/@tiptap/core/dist/tiptap-core.esm.js b/node_modules/@tiptap/core/dist/tiptap-core.esm.js -index 3739b80..173171c 100644 +index 6ef6d0c..fd89f44 100644 --- a/node_modules/@tiptap/core/dist/tiptap-core.esm.js +++ b/node_modules/@tiptap/core/dist/tiptap-core.esm.js -@@ -2768,8 +2768,7 @@ const Keymap = Extension.create({ +@@ -3120,8 +3120,7 @@ const Keymap = Extension.create({ new Plugin({ key: new PluginKey('clearDocument'), appendTransaction: (transactions, oldState, newState) => { @@ -12,17 +12,20 @@ index 3739b80..173171c 100644 if (!docChanges) { return; } -@@ -2777,10 +2776,11 @@ const Keymap = Extension.create({ +@@ -3129,10 +3128,14 @@ const Keymap = Extension.create({ const allFrom = Selection.atStart(oldState.doc).from; const allEnd = Selection.atEnd(oldState.doc).to; const allWasSelected = from === allFrom && to === allEnd; - const isEmpty = newState.doc.textBetween(0, newState.doc.content.size, ' ', ' ').length === 0; - if (empty || !allWasSelected || !isEmpty) { ++ + if (empty || !allWasSelected) { return; } ++ + const isEmpty = newState.doc.textBetween(0, newState.doc.content.size, ' ', ' ').length === 0; + if (!isEmpty) return; ++ const tr = newState.tr; const state = createChainableState({ state: newState,