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

Dialog takes focus, can we add notice about such default behavior in docs? #13020

Closed
liesislukas opened this issue Sep 27, 2018 · 8 comments
Closed
Labels
component: modal This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@liesislukas
Copy link
Contributor

Not sure where to post such info but when using material-ui Dialog and rendering tinymce inside it, material-ui dialog is getting focus by default which makes tinymce dialogs uneditable.

The solution is to add disableEnforceFocus to the dialog. Would like to mention such info somewhere on documentation but can't decide where and what sentence would be best to provide such notice. I believe people have the same issue with any other dialog rendered inside material-ui Dialog. It was a headache for some time, would love to have noticed on docs.

I believe having some yellowish notice here https://material-ui.com/demos/dialogs/ would make sense.

image

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 27, 2018

@liesislukas You will find this information in https://material-ui.com/utils/modal/ (the page is linked in the dialog page). It's a default accessibility behavior all modals should have.

@oliviertassinari oliviertassinari added support: question Community support but can be turned into an improvement component: modal This is the name of the generic UI component, not the React module! labels Sep 27, 2018
@oliviertassinari
Copy link
Member

How do you think we should handle the issue?

@sashless
Copy link

sashless commented Jul 23, 2019

Maybe a selector whitelist to allow a focus change to some elements would work @oliviertassinari ?

@oliviertassinari
Copy link
Member

@sashless Do you have a reproduction of the issue? It would help explore the different option to solve the problem.

@liesislukas
Copy link
Contributor Author

so i assume disableAutoFocus={true} would solve this? Can't try atm

@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed component: modal This is the name of the generic UI component, not the React module! support: question Community support but can be turned into an improvement labels Jul 29, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 29, 2019

Duplicate of #15694 and #15450.

@tanmaykaushik451
Copy link

Thanks a lot brother..Was stuck in this thing for two days ..couldnt even have thought of this...I tried it and it worked like a charm

@AMITKESARI2000
Copy link

@mui mui locked as resolved and limited conversation to collaborators Oct 30, 2021
@oliviertassinari oliviertassinari added the component: modal This is the name of the generic UI component, not the React module! label Oct 30, 2021
@oliviertassinari oliviertassinari changed the title material-ui Dialog takes focus, can we add notice about such default behavior in docs? Dialog takes focus, can we add notice about such default behavior in docs? Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: modal This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants