Skip to content

Commit 47fd128

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): don't restore input of type file during HMR
``` 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. ``` Closes #22084
1 parent 47aa411 commit 47fd128

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/angular_devkit/build_angular/src/builders/dev-server/hmr_spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ describe('Dev Server Builder HMR', () => {
5858
<p>{{title}}</p>
5959
6060
<input class="visible" type="text">
61+
<input type="file">
6162
<input type="hidden">
63+
6264
<select>
6365
<option>one</option>
6466
<option>two</option>

packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts

-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ function restoreFormValues(oldInputs: any[], oldOptions: any[]): void {
197197
case 'date':
198198
case 'datetime-local':
199199
case 'email':
200-
case 'file':
201200
case 'hidden':
202201
case 'month':
203202
case 'number':

0 commit comments

Comments
 (0)