-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When the user inputs text to MatInput or selects an option in MatSelect, the placeholder should disappear (as defined by the MAT_LABEL_GLOBAL_OPTIONS) and form validations should activate.
What is the current behavior?
The behavior works as expected on development builds. However when bundled with "ng build -prod" we get the following outcomes:
- MatInput: text starts typing behind the placeholder text. only when you click on the input field does the placeholder disappear.
- MatSelect: the select box either refuses to open, or when opened clicking on an option does nothing.
These behaviors also affect form validations.
What are the steps to reproduce?
build an app with the -prod flag
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
when tested on a demo app with the following package.json configuration, we get expected behavior
"dependencies": { "@angular/animations": "^4.0.0", "@angular/cdk": "^2.0.0-beta.8", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/material": "^2.0.0-beta.8", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", "core-js": "^2.4.1", "hammerjs": "^2.0.8", "material-design-icons": "^3.0.1", "rxjs": "^5.4.1", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "1.3.1", "@angular/compiler-cli": "^4.0.0", "@angular/language-service": "^4.0.0", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~8.0.17", "codelyzer": "~3.1.2", "firebase-tools": "^3.9.1", "jasmine-core": "~2.7.0", "jasmine-spec-reporter": "~4.2.0", "karma": "~1.7.0", "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.6.0", "typescript": "~2.4.2" }
however when updated to Angular v.5 packages, the demo app also fails to produce expected behavior.