Complex reactivity issue involving HMR and derived state causing performance degradation.
The issue describes a performance problem where HMR triggers infinite re-renders when using $derived with dynamic components. The workaround suggests this involves deep reactivity system behavior. The problem requires understanding Svelte's reactivity model and HMR integration, making it complex to diagnose and fix.
If you write a four-digit number, which does not end in zero (1005, 1568, 5896, etc.) and press ENTER, it's converted in the correct format, but when you press the mouse out of the field (focus out), it drops the last 3 digits so for 2456 it becomes "2" and for 1456 it becomes "1", it is also sent when creating/saving a document, making it impossible to put numbers with those characteristics.
This started to happen without any changes, I updated to the latest version and it's still the same.
Output of bench version
erpnext 13.34.2
frappe 13.34.0
The number gets converted to: 1

The number gets converted to: 1.005
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!