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

Auto focus in textarea inside model is creating problems #23165

Closed
Ankish76 opened this issue Oct 19, 2020 · 3 comments
Closed

Auto focus in textarea inside model is creating problems #23165

Ankish76 opened this issue Oct 19, 2020 · 3 comments
Labels
component: FocusTrap The React component. support: Stack Overflow Please ask the community on Stack Overflow

Comments

@Ankish76
Copy link

autofocus enabled textarea input which in inside modal is creating a loop on keypress and causing a performance issue. This is happening due to Unstable_TrapFocus component. I did tried disabling force autofocus with disableEnforceFocus prop.
but it didn't helped.

I think that setInterval should only be called when disableEnforceFocus is false.

Adding an option to not wrap modal children in Unstable_TrapFocus will be great.

image

Environment 🌎

Tech Version
Material-UI v4.11.0
React v16.11.0
@Ankish76 Ankish76 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 19, 2020
@oliviertassinari oliviertassinari added status: waiting for author Issue with insufficient information component: FocusTrap The React component. support: Stack Overflow Please ask the community on Stack Overflow and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer status: waiting for author Issue with insufficient information labels Oct 20, 2020
@support
Copy link

support bot commented Oct 20, 2020

👋 Thanks for using Material-UI!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://material-ui.com/getting-started/support/. Thanks!

If you have a question on StackOverflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@support support bot closed this as completed Oct 20, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 20, 2020

I'm going to assume it's a support question, the issue template wasn't respected, no reproduction was provided, the screenshotted code is v4, ongoing development is on v5.

@mschipperheyn
Copy link

@oliviertassinari This is a bug report. The interval should be disabled if disableEnforceFocus is true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: FocusTrap The React component. support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

3 participants