Repository navigation
Description
Summary
On iOS/iPadOS Safari, inserting a custom React block (createReactBlockSpec) into the editor while it is focused locks the main thread in an infinite loop. The tab freezes with no exception and no console output; iOS then kills it. Native blocks (paragraph, quote, heading…) are unaffected.
Verified on @blocknote/react@0.51.4 and still present in the code of 0.54.0 (with @tiptap/core@3.26.1 / 3.30.2).
Mechanism
@tiptap/core's NodeView.ignoreMutation has an iOS/Android branch (added for ueberdosis/tiptap#1971):
if (this.dom.contains(mutation.target) && mutation.type === "childList"
&& (isiOS() || isAndroid()) && this.editor.isFocused) {
const changedNodes = [...mutation.addedNodes, ...mutation.removedNodes];
if (changedNodes.every((node) => node.isContentEditable)) return false; // "do NOT ignore"
}this.dom is the whole node view, so React mounting the block's own rendered content inside it also matches:
- React mounts the block component inside the node view →
childListmutation, added nodes contentEditable ignoreMutationreturnsfalse→ ProseMirror redraws the node view- React remounts → another
childListmutation → back to 2, forever
The loop is synchronous and reschedules in a microtask (processRootScheduleInMicrotask → flushSyncWorkAcrossRoots_impl → performSyncWorkOnRoot), so the thread never yields. A CPU profile at the freeze is dominated by appendChild/removeChild, ignoreMutation, and the React node-view teardown/rebuild cycle.
Why users can't work around it
TipTap consults this.options.ignoreMutation before the iOS branch — so a per-node-view override would fix it cleanly. But @blocknote/react hardcodes the renderer options:
ReactNodeViewRenderer(component, { className: "bn-react-node-view-renderer" })createReactBlockSpec exposes no way to pass ignoreMutation through (same gap as ueberdosis/tiptap#1538). The only fix available today is patching @tiptap/core (we ship patch-package narrowing the branch's this.dom to this.contentDOM, which preserves the mobile-keyboard fix the branch exists for while excluding node-view chrome).
Reproduction (no device needed)
TipTap's isiOS() is platform ∈ {iPad, iPhone, iPod, …} || (navigator.userAgent.includes("Mac") && "ontouchend" in document) — so Chrome/Chromium with touch emulation enabled and any Mac-containing UA reproduces it exactly (e.g. CDP Emulation.setTouchEmulationEnabled or DevTools device toolbar):
- Editor with any
createReactBlockSpecblock registered, touch emulation on - Focus the editor, open the slash menu, insert the React block (keyboard Enter suffices — no tap involved)
- Main thread wedges:
1+1in the console never evaluates
Neither viewport width nor the mobile UA matters; touch capability alone flips isiOS()'s second clause. On a real iPhone navigator.platform === "iPhone" makes it unconditional.
Ask
Either:
- forward an
ignoreMutationoption fromcreateReactBlockSpecthrough toReactNodeViewRenderer, or - have BlockNote's renderer supply a default
ignoreMutationthat ignores mutations originating from the React-rendered part of the node view (everything outsidecontentDOM).
Happy to PR either direction if you have a preference. (We're also filing the underlying this.dom vs this.contentDOM question with TipTap, but BlockNote exposing the seam is what lets consumers fix this without vendor patches.)
Activity
marxjb commentedon Aug 20, 2026
Filed the underlying TipTap report: ueberdosis/tiptap#8220 (proposes narrowing the branch to
contentDOM, which is the patch we run in production).marxjb commentedon Aug 20, 2026
Runnable minimal reproduction: https://github.com/marxjb/blocknote-ios-freeze-repro
npm install && npm run reproruns the app headless twice (touch emulation off / on), presses the same insert button, and asks the renderer whether it still evaluates1+1:One finding worth flagging while building it — measured, same harness,
@tiptap/core/@tiptap/reactidentical at 3.30.2 in both rows:@blocknote/reactSo something in BlockNote 0.52–0.54 changed the React node-view mounting such that this minimal case no longer triggers the TipTap branch (the branch itself is unchanged through 3.30.2). The harness refuses to report OK unless the inserted block actually rendered, so the 0.54 pass isn't a silently failed insertion.
That may reduce the practical severity on latest — though I don't know which change did it or whether richer blocks (portals, popovers, effects that touch the DOM on mount) still trigger it on 0.54. The
ignoreMutationseam request stands either way: the hazardous TipTap branch is still live, and consumers on it have no non-patch recourse. If someone recognizes which 0.52–0.54 change altered the mount behaviour, that would tell us whether the fix was deliberate or incidental.matthewlipski commentedon Aug 21, 2026
Hi @marxjb, it seems that #2912 should be the appropriate fix for this issue and was included in the 0.53.0 release. Could you verify whether you're still getting a crash on that version or above?
xiaweiss commentedon Sep 18, 2026
Why does a block node have two layers of nodeViewWrapper?
xiaweiss commentedon Sep 18, 2026
This looks like a nesting-induced bug — up until the loop kicks in, ignoreMutation returns true as expected.
Details are over in tiptap#8220 — I commented there.
matthewlipski commentedon Sep 18, 2026
This is just how TipTap renders React node views with content - you get a
data-node-view-wrapperon the node view's root element, then the content is wrapped in both its owndata-node-view-wrapperand a parentdata-node-view-content. Works the same in their draggable block example.@xiaweiss out of curiosity, which versions of BlockNote/Tiptap have you reproduced this issue in? Just to know if #2912 is relevant or if it's strictly down to ueberdosis/tiptap#8220
xiaweiss commentedon Sep 18, 2026
Reproduced on v1.31.1 — it affects mobile line-breaking behaviour. I have a fix working in the current example; it might be worth exercising other BlockNote scenarios too.
xiaweiss commentedon Sep 18, 2026
I create a pr ueberdosis/tiptap#8355
nperez0111 commentedon Nov 16, 2026
I'm going to close this until we get a tight reproduction of this in the latest version of blocknote
xiaweiss commentedon Nov 16, 2026
Not sure whether there's an issue with BlockNote's Vue framework — currently it mainly affects Vue behavior on mobile. For the issue, I've only tested the React demo so far; I still need to add some additional test cases.
nperez0111 commentedon Nov 16, 2026
@xiaweiss BlockNote has no integration with Vue, it is built in React as it's view layer