Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datepicker] Error + Input doesn't render in Universal (nativeElement.blur is not a function) #10248

Closed
NgxDev opened this issue Mar 2, 2018 · 1 comment · Fixed by #10249
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@NgxDev
Copy link

NgxDev commented Mar 2, 2018

Bug, feature request, or proposal:

[x] Bug

What is the expected behavior?

Usage of MatDatepicker shouldn't error while rendered in Universal, and the input should be rendered in the server view.

What is the current behavior?

It errors when the app is rendered on the server and the input isn't rendered.

ERROR TypeError: this._elementRef.nativeElement.blur is not a function
    at MatDatepickerInput.set [as disabled] (D:\www\docks\adminpanel\app\dist\server.js:171253:48)
    at updateProp (D:\www\docks\adminpanel\app\dist\server.js:12910:37)
    at checkAndUpdateDirectiveInline (D:\www\docks\adminpanel\app\dist\server.js:12629:19)
    at checkAndUpdateNodeInline (D:\www\docks\adminpanel\app\dist\server.js:14184:20)
    at checkAndUpdateNode (D:\www\docks\adminpanel\app\dist\server.js:14127:16)
    at prodCheckAndUpdateNode (D:\www\docks\adminpanel\app\dist\server.js:14851:5)
    at Object.updateDirectives (D:\www\docks\adminpanel\app\dist\server.js:187493:831318)
    at Object.updateDirectives (D:\www\docks\adminpanel\app\dist\server.js:14573:29)
    at checkAndUpdateView (D:\www\docks\adminpanel\app\dist\server.js:14093:14)
    at callViewAction (D:\www\docks\adminpanel\app\dist\server.js:14444:21)

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

Angular: 5.2.7
Angular Material: 5.2.3
@crisbeto crisbeto self-assigned this Mar 3, 2018
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Mar 3, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 3, 2018
Fixes disabled datepicker inputs throwing an error when rendering on the server.

Fixes angular#10248.
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 3, 2018
Fixes disabled datepicker inputs throwing an error when rendering on the server.

Fixes angular#10248.
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 6, 2018
Fixes disabled datepicker inputs throwing an error when rendering on the server.

Fixes angular#10248.
jelbourn pushed a commit that referenced this issue Mar 9, 2018
Fixes disabled datepicker inputs throwing an error when rendering on the server.

Fixes #10248.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants