🐞 Bug report
Command (mark with an x)
Is this a regression?
No
Description
When we use HMR, this one tries to restore values for fields after reloading. Unfortunately, it also tries to do this for inputs of type file, which it should not do. Only the user can update a value of this type. This causes the browser to report the error.
🔬 Minimal Reproduction
ng serve --hmr
🔥 Exception or Error
Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
🌍 Your Environment
Angular CLI: 12.1.0
Node: 14.17.4
Package Manager: npm 7.21.1
OS: darwin x64
Angular: 12.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1201.0
@angular-devkit/build-angular 12.1.0
@angular-devkit/core 12.1.0
@angular-devkit/schematics 12.1.0
@schematics/angular 12.1.0
rxjs 6.6.3
typescript 4.3.4
🐞 Bug report
Command (mark with an
x)Is this a regression?
No
Description
When we use HMR, this one tries to restore values for fields after reloading. Unfortunately, it also tries to do this for inputs of type file, which it should not do. Only the user can update a value of this type. This causes the browser to report the error.
🔬 Minimal Reproduction
ng serve --hmr🔥 Exception or Error
🌍 Your Environment