Skip to content

[datepicker, es2015] Cannot read property 'focus' of null #10347

Closed
@mantyz

Description

@mantyz

Bug, feature request, or proposal:

Bug
Datepicker don't work if builded(--prod) with TS target = es2015

What is the expected behavior?

Datepicker must show dates.

What is the current behavior?

Datepicker don't show dates.
rep1

What are the steps to reproduce?

  1. git clone https://github.com/mantyz/datepicker-repro.git
  2. cd datepicker-repro
  3. npm install
  4. ng serve --prod
  5. run localhost:4200
  6. open calendar

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 1.7.3
Node: 8.10.0
OS: linux x64
Angular: 5.2.8
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.2.4
@angular/cli: 1.7.3
@angular/material-moment-adapter: 5.2.4
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0

OS: Debian 8
Browsers: Chrome 65, Firefox 58

Is there anything else we should know?

Worked if builded with target=es5.
And worked if ng serve --aot with target=es2015.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions