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

[TextField (multiline, controlled)] In IE and Edge, a controlled multiline TextField doesn't expand upon adding newlines with no other text present. #12172

Closed
dcorliss-Novetta opened this issue Jul 17, 2018 · 6 comments · Fixed by #15331
Assignees
Labels
bug 🐛 Something doesn't work component: TextareaAutosize The React component.

Comments

@dcorliss-Novetta
Copy link

dcorliss-Novetta commented Jul 17, 2018

I am using a TextField for sending messages in a chat application. My implementation requires that the TextField expand, can accept newlines via shift+enter, and send a message (empty the textfield) upon hitting enter.

I am using React 15.6 and MaterialUI v0.20.1 (I'd rather use the latest version, but its not up to me unfortunately)

I have everything working as it should, with one exception. In IE11 and Edge, if the textfield is empty and I add newlines (either with the defualt behavior of the enter key, or by adding the newline to the endof the controlled value, the TextField refuses to expand until other text is entered.

This error can be replicated in the MaterialUI demo in IE and Edge, even in the current version of Material UI. It works properly in Chrome and Firefox. Is there any way to work around this? Is the issue known already?

Thanks!

multiline2

@oliviertassinari
Copy link
Member

@dcorliss-Novetta v0.x is no longer maintained.

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: text field This is the name of the generic UI component, not the React module! labels Jul 17, 2018
@dcorliss-Novetta
Copy link
Author

Yeah, sorry I wasn't more clear to begin with that the issue is in the current version as well.

@Ziv-Barber
Copy link

The current version is not supporting anymore the multiline feature.

@dcorliss-Novetta
Copy link
Author

If the multiline feature is not supported in the current version, why is it in the demo for the current version?

@Ziv-Barber
Copy link

Sorry, it IS supported:
https://material-ui.com/demos/text-fields/

@joshwooding
Copy link
Member

joshwooding commented Jan 3, 2019

I found a working example in vanilla javascript: http://jsfiddle.net/n9uuv0hd/658/

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work and removed new feature New feature or request labels Apr 12, 2019
@oliviertassinari oliviertassinari self-assigned this Apr 13, 2019
@oliviertassinari oliviertassinari added component: TextareaAutosize The React component. and removed component: text field This is the name of the generic UI component, not the React module! labels Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: TextareaAutosize The React component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants