Skip to content

BlockNote editor renders but does NOT accept user input in production build (Vite + Rollup) #2925

Description

@gitfromwildan

Description

BlockNote editor (WYSIWYG mode) renders correctly but does not accept any user input — clicking, typing, or slash commands have no effect in production builds. No JavaScript errors appear in console. Markdown source mode (plain <textarea>) works perfectly. Everything works fine in dev mode.

To Reproduce

  1. Create a React + Vite + TypeScript app
  2. Install @blocknote/react, @blocknote/mantine, @blocknote/core v0.52.1
  3. Set up the editor:
const editor = useCreateBlockNote({ schema }, [markdown])
return <BlockNoteView editor={editor} theme="dark" />
  1. Run vite build to create production bundle
  2. Serve the built files (e.g., via Tauri v2 or any static server)
  3. Click inside the editor — cursor does not appear
  4. Type — no text appears
  5. Press / — slash menu does not appear
  6. Switch to a plain <textarea> mode — typing works perfectly

Expected Behavior

Editor should accept keyboard input and show the slash menu in production builds, identical to dev mode behavior.

Environment

Package Version
@blocknote/core 0.52.1
@blocknote/react 0.52.1
@blocknote/mantine 0.52.1
React 19.2.8
ReactDOM 19.2.8
Vite 6.4.3
Rollup 4.62.3
Node 22.x
OS macOS 12.7 (Monterey)
Bundler Vite 6 + Rollup (also tested with Vite 8 + Rolldown 1.2.0 — same result)

Additional Details

  • No console errors: Tested with window.addEventListener("error") and window.addEventListener("unhandledrejection") handlers — nothing captured
  • CSS is properly bundled: Built CSS contains 946 .bn- occurrences and 1795 mantine- occurrences
  • Not a minification issue: Same result with build.minify: false and build.sourcemap: true
  • Not bundler-specific: Reproduced with both Rollup (Vite 6) and Rolldown (Vite 8)
  • Not a CSS import issue: Tested with multiple CSS import strategies (direct imports, CSS @import, explicit paths)
  • Dev mode works perfectly: Including with React.StrictMode double-rendering
  • Plain textarea works: Markdown source mode (switching to <textarea>) allows typing normally
  • Tauri v2 WKWebView: Tested in Tauri v2 production binary (macOS Monterey Safari/WebKit 15.x) — same issue when opening dist/index.html directly in any browser

Suspected Cause

The editors contenteditable element renders in the DOM but seems disconnected from the ProseMirror/TipTap engine. Since:

  • Dev mode (React strict double-mount) works
  • Production mode (single mount) fails
  • No errors surface

This suggests a timing or interop issue between ProseMirror initialization and the React production build bundling.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions