matInput don`t float placeholder
See original GitHub issueBug, feature request, or proposal:
any element that supports ‘matInput’ have problem with placeholder.
What is the expected behavior?
placeholder should float to top when input is focused
What is the current behavior?
placeholder stands on his previous position and overlaps with text in input
![Image of Yaktocat] (https://image.ibb.co/iHs3MG/2017_10_09_19_12_51.png)
What are the steps to reproduce?
Insert this html code into page:
<form #editTaskForm="ngForm">
<mat-form-field>
<input matInput type="text" placeholder="Название" [(ngModel)]="model.Title" name="Title" #Title="ngModel" required [disabled]="userRole == 'assignedTo'">
</mat-form-field>
<mat-form-field class="example-full-width">
<textarea matInput rows="5" placeholder="Описание" [(ngModel)]="model.Description" name="Description" #Description="ngModel" [disabled]="userRole == 'assignedTo'"></textarea>
</mat-form-field>
</form>
What is the use-case or motivation for changing an existing behavior?
It is very important, because it destroys all design in forms! It is annoyin, when you are updating to upper version and something simple fails!
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
“dependencies”: { “@angular/animations”: “^4.4.2”, “@angular/cdk”: “^2.0.0-beta.12”, “@angular/common”: “^4.4.2”, “@angular/compiler”: “^4.4.2”, “@angular/core”: “^4.4.2”, “@angular/forms”: “^4.4.4”, “@angular/http”: “^4.4.2”, “@angular/material”: “^2.0.0-beta.12”, “@angular/platform-browser”: “^4.4.2”, “@angular/platform-browser-dynamic”: “^4.4.2”, “@angular/router”: “^4.4.2”, “classlist.js”: “^1.1.20150312”, “core-js”: “^2.5.1”, “intl”: “^1.2.5”, “ng2-dragula”: “^1.5.0”, “rxjs”: “^5.4.2”, “web-animations-js”: “^2.3.1”, “zone.js”: “^0.8.14” }, “devDependencies”: { “@angular/cli”: “1.4.2”, “@angular/compiler-cli”: “^4.4.2”, “@angular/language-service”: “^4.4.2”, “@types/jasmine”: “~2.6.0”, “@types/jasminewd2”: “^2.0.3”, “@types/node”: “^8.0.28”, “codelyzer”: “~3.2.0”, “jasmine-core”: “~2.8.0”, “jasmine-spec-reporter”: “~4.2.1”, “karma”: “^1.7.1”, “karma-chrome-launcher”: “~2.2.0”, “karma-cli”: “~1.0.1”, “karma-coverage-istanbul-reporter”: “^1.2.1”, “karma-jasmine”: “~1.1.0”, “karma-jasmine-html-reporter”: “^0.2.2”, “protractor”: “~5.1.2”, “ts-node”: “~3.3.0”, “tslint”: “~5.7.0”, “typescript”: “~2.5.2” }
Is there anything else we should know?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:11 (1 by maintainers)
Top GitHub Comments
doesnt seem to be working. Im on 7.3.0 and its still floating placeholder.
seems to only work if you use
<mat-form-field floatLabel="never" >
use:
<mat-form-field floatPlaceholder="never" >