Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material UI Errors in React Toolbar Components #1901

Closed
JanReichelt opened this issue Oct 12, 2022 · 4 comments · Fixed by #2023
Closed

Material UI Errors in React Toolbar Components #1901

JanReichelt opened this issue Oct 12, 2022 · 4 comments · Fixed by #2023

Comments

@JanReichelt
Copy link

JanReichelt commented Oct 12, 2022

Summary

The React Toolbar Component (e.g. the CommandButton) throws Errors, because a disabled Button is wrapped with a Tooltip (see screenshot), which directly disables it (because pointer events are prohibited this way).
I experienced it with the prebuilt react undo and redo buttons, but it should apply to all other Toolbar buttons as well.

Versions

(used in the example repo)

    "remirror": "^2.0.10"
    "@remirror/pm": "^2.0.0",
    "@remirror/react": "^2.0.10",

Steps to reproduce

Just use the 5 Minute Tutorial boilerplate and add a MarkdownToolbar from @remirror/react. Or:
Example Git-Repo: https://github.com/JanReichelt/remirror-mui-error

Inspect the browser console to see the mentioned errors.

Possible Solution

It is proposed here that the Button could be wrapped in an intermediary html tag to re-enable pointer events as a quick fix.

Screenshot(s)

Bildschirmfoto 2022-10-12 um 10 26 55

@NotNikita
Copy link

Interesting, i also have MUI error in remirror, but in node_modules:
image

@peter-popluhar
Copy link

Hello. Any progress on this issue?
Im having same problem, and it throws a lot of warnings in jest test runner as well.
codesanndbox: https://codesandbox.io/p/sandbox/silly-mayer-70ehsh?selection=%5B%7B%22endColumn%22%3A10%2C%22endLineNumber%22%3A5%2C%22startColumn%22%3A10%2C%22startLineNumber%22%3A5%7D%5D&file=%2Fcomponents%2FRemirror.tsx

page: https://70ehsh-3000.preview.csb.app/ (open console in browser, and reload page. warnings should be present)

@kr1stjans
Copy link

Same issue here

@ajspetner
Copy link
Contributor

I just submitted the above PR which implements the proposal referenced by @JanReichelt . This fix also makes tooltips work for inactive buttons (which is the typical behavior seen in most apps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants