HMR with Ionic causes inputs to not be restored #19385
Labels
area: @angular-devkit/build-angular
devkit/build-angular:dev-server
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: ....No, as HMR did not exist 😄
Description
A clear and concise description of the problem...While serving an app with Ionic and HMR enabled, if certain Ionic components are present in the DOM, HMR is not able to save and restore input values. This is because certain ionic components make use of hidden inputs.
As hmr-accept.ts gets updates, it queries for all inputs in the dom, including the hidden ones. After the dom is rebuilt, the hidden input in Ionic is not rendered, causing a mismatch in the old/new inputs. Since the inputs do not match, it currently just prints a warning to the dev tools
A PR to address this is on it's way 😬
🔬 Minimal Reproduction
https://github.com/mhartington/hrm-ionic-test
🔥 Exception or Error
🌍 Your Environment
The text was updated successfully, but these errors were encountered: