mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.63k stars 131 forks source link

[BUG] Minified React error #185 when editing table cells #404

Open Debnathweb opened 3 months ago

Debnathweb commented 3 months ago

If you want to ask for support or request features, sponsor the project and contact me over email.

Describe the bug showing this error on console, on my repo and also on https://mdxeditor.dev/editor/demo

content.js:2 [mobx] uncaught error in 'Reaction[z.render()]' Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Zl (content.js:2:719174)
    at Object.enqueueForceUpdate (content.js:2:670338)
    at v.forceUpdate (content.js:2:448636)
    at e.onInvalidate_ (content.js:2:156722)
    at t.runReaction_ (content.js:2:30119)
    at Et (content.js:2:31561)
    at _t (content.js:2:31289)
    at content.js:2:34455
    at Yl (content.js:2:722525)

Reproduction what this screen

To Reproduce Steps to reproduce the behavior: go to https://mdxeditor.dev/editor/demo open console create a table enter an element on cell other than text like a divider and then write some text on text other cell and it will start throwing err on console

Expected behavior no error

Screenshots Screenshot (120)

https://www.loom.com/share/46114da8d0a547eab2d7e5a1b34fadba?sid=c00f34b1-df07-47e1-ab20-10ad81484cf7

Desktop (please complete the following information):

Additional context

petyosi commented 3 months ago

@Debnathweb I've seen this error in Sentry but I can't replicate it on my side, even when I try to follow the exact steps from your Loom. How do you switch between the cells? By clicking with the mouse or with with the arrow keys? Also (this is a bit unlikely), does this still happen with the latest version of the editor that includes Lexical 0.14?

Something that might help is if you can clone the repo, run the examples, and try to replicate the problem here?

Debnathweb commented 3 months ago

@Debnathweb I've seen this error in Sentry but I can't replicate it on my side, even when I try to follow the exact steps from your Loom. How do you switch between the cells? By clicking with the mouse or with with the arrow keys?

By clicking with the mouse

Also (this is a bit unlikely), does this still happen with the latest version of the editor that includes Lexical 0.14? yes with the latest version

Something that might help is if you can clone the repo, run the examples, and try to replicate the problem here?

yesterday i started a new projects with the current version after you deploy 2.19.0, and i noticed this problem on my projects then i test it on the mdx editro live demo site. https://mdxeditor.dev/editor/demo

same error happen with other editor component also, on Insert Admonition components (note or info) , if insert a divider into the components and then type something.

suggested solving ( i am not very experienced developer, excuse me if i am not doing it right)

when table cell is active hide all other components which can create this error like divider ( as we can not use a divider inside table on markdown) as your doing it with the Insert Admonition component , as we are selecting info or note on the editor you are hiding Insert Admonition components from the toolbar as we can not use a info within info or note

Debnathweb commented 3 months ago

@petyosi tried with edge, brave and firefox , no error on those browser but firefox throwing this error Error: Minified Lexical error #19; visit https://lexical.dev/docs/error?code=19 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. NextJS 6 G rZ rA 7777 7777 l

create a repository from mdx-editor-in-cra example and tested it same error, https://github.com/Debnathweb/mdx-editor-in-cra