mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(autosize): remove resize handle (#8621)
Removes the resize handle on autosize textareas, because the user's height will be overwritten once they start typing again.
This commit is contained in:
committed by
mmalerba
parent
97b126984c
commit
0d2a419a55
@@ -17,6 +17,7 @@ import {Platform} from '@angular/cdk/platform';
|
||||
selector: `textarea[mat-autosize], textarea[matTextareaAutosize]`,
|
||||
exportAs: 'matTextareaAutosize',
|
||||
host: {
|
||||
'class': 'mat-autosize',
|
||||
// Textarea elements that have the directive applied should have a single row by default.
|
||||
// Browsers normally show two rows by default and therefore this limits the minRows binding.
|
||||
'rows': '1',
|
||||
|
||||
@@ -82,3 +82,9 @@ textarea.mat-input-element {
|
||||
resize: vertical;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
// Remove the resize handle on autosizing textareas, because whatever height
|
||||
// the user resized to will be overwritten once they start typing again.
|
||||
textarea.mat-autosize {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user