patrick-steele-idem / morphdom

Fast and lightweight DOM diffing/patching (no virtual DOM needed)
MIT License
3.22k stars 131 forks source link

Optimization recommendation in README is a hazard and should be removed #259

Open aaronjensen opened 3 months ago

aaronjensen commented 3 months ago

Without enough consideration, I added this to our code:

https://github.com/patrick-steele-idem/morphdom?tab=readme-ov-file#can-i-make-morphdom-blaze-through-the-dom-tree-even-faster-yes

A year or so later, we started to observe problems with radio button groups that were moved in the DOM. Morphdom would fail to ensure that the value was set properly. Removing this optimization corrected the problem after nearly a day of total investigation.

I'd recommend removing this or somehow updating it to not have the problem I mentioned. I don't think I'll be able to produce a test harness to reproduce the problem.