Skip to content

Cut/Copy commands throw a silent error when SideMenu is disabled #1940

@MetaMmodern

Description

@MetaMmodern

Describe the bug
If you disable sideMenu using editor configuration you loose ability to copypaste content. Related to #1286 .

Temporary fix is to call initializeESMDependencies ourselves somewhere in the app.

To Reproduce

  1. Go here: https://stackblitz.com/edit/github-q9jxmzsp?file=src%2FApp.tsx
  2. Render the app.
  3. Open DevTools convsole.
  4. Type in text, highlight it and hit Cmd+C (or Ctrl+C if on Wndows).
  5. Observe error in logs.
  6. Hit Cmd+V.
  7. Observe that nothing is pasted.
    Same stuff with Cmd+X.
    Same stuff if you try to copy/cut using system context menu(highlight->right click->copy or cut).

Misc

  • Node version: 20.19.1
  • Package manager: npm
  • Browser: Chrome(Arc) latest.
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

P.S. I disable SideMenu on that level and not only through props, because SideMenu makes my whole app very laggy(I render 100+ small editors). That happens because sideMenu registers a lot of drag listeners that get called even if dragging is not happening on handle itself. That's a separate issue, but all I'm saying is that sideMenu=false as a prop on React component simply hides it, without disabling those listeners)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions