Bug
Textarea should be resized to a single line.
Resize doesn't shrink textarea to a single line, stops at minimum of two lines.
http://plnkr.co/edit/0HyRxBSQI7wksb7QFLDE?p=preview
Angular: 4.1.3
Material: v2.0.0-beta.6
OS: tested on Mac OS X 10.11.6
Browsers: tested on both Chrome 58 and Firefox 54
By default every textarea has the rows attribute set to 2.
This means that this is actually not an issue but maybe this should be just mentioned in the docs.
Also possible would be setting the default amount of rows to 1.
@mmalerba What do you think?
@DevVersion Just FYI in angular/material v1 there was a similar bug, and its description said that default rows must be 1 according to the spec: https://github.com/angular/material/issues/2154 . Not sure whether it is still actual though - I was not able to find such information in the spec.
@ruslan-simonenko Thanks for linking this issue. I was not able to find it either but I just think it still makes sense to switch to 1 row by default because otherwise the mdAutosizeMinRows attribute does not work properly.
Multi-line text fields wrap text onto a new line by expanding the bottom of the field, shifting screen elements downward.
Not sure if this indicates that it should start with a single row by default.
I think the default of 2 is just to match the native textarea's default. @jelbourn actually wrote the autosize, do you have an opinion on this Jeremy/
@mmalerba Yeah I agree that it would be easier to follow the design of the native textarea.
I just think if it is specified (still not sure where explicitly) then it's something we need to think about more.
Interesting- the spec designates "multi-line text field" and "text area" as two completely different things. On web, they're both <textarea> under the hood.
Either way, I agree that it should default to one row, otherwise you don't really have a way to do that.
I stiil have this bug in Firefox 54 with Material 2.0.0-beta.8.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
I stiil have this bug in Firefox 54 with Material 2.0.0-beta.8.