-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Textarea width bug in chrome #6511
Comments
@jojodadj can you link to your project and or build a codepen showing the issue? The bug you are describing does not happen with the materialize docs page so it suggests there is an error in your code. Did you use the exact markup from the docs?
https://materializecss.com/text-inputs.html#textarea Also, are you dynamically updating the contents of the text area?
|
I have just tested in code pen and it works as it should however I have attached here a basic HTML file, if you open this in chrome and then resize the window you will see it does not resize correctly. If you refresh the page once in mobile view it will then work. If you then comment out the Materialize script tag the window then resizes fine. |
It works fine. I've attached your html file with the materialize.js uncommented, and it works just as it should. If you can't replicate in a codepen then the issue is coming from somewhere else. You should really get some advice in the gitter channel before opening an issue here - this is for actual bugs that can be reproduced. |
This turns out it is a bug in Chrome for Mac, at the end of the day this is a bug that I found while using Materialize and could reproduce it in my own environment. If anything someone else who is having this issue will find this post and hopefully the next version of chrome will fix this. |
I have found a bug in chrome with the textarea. When using the textarea with the class .materialize-textarea
When scaling the browser window down from desktop to mobile the textarea overflows on the right making lots of white space. I cannot see this overflow in dev tools however I think it is down to the javascript used on the textarea.
If you reload the page when in mobile view the issue is gone, this only happens when scaling down from a larger screen.
If I copy all the css classes to my own class and remove the materialize-textarea class the bug is fixed however the javascript is now not running on the textarea so it doesn't change its height when entering a new line. Im thinking the bug could be something to do with the javascript?
The text was updated successfully, but these errors were encountered: