Open J-Sek opened 4 months ago
It could even be conditional @focus="model === 0 && $event.currentTarget.select()"
... but I am not not sure if I like it. It might be a matter of taste, but I prefer that clear-zero
resembles placeholder behavior while focus drags unnecessary attention and might feel unexpected.
That said, I have no more arguments. And if it feels "too niche" for you, I won't feel strongly about closing this feature request without merge.
Problem to solve
User needs to remove
0
when the input is focused and it's initial value is0
. We can achieve better UX by hiding0
immediately and restoring on blur if necessary.Proposed solution
Clear internal value on @focus
Example playground (ideally it would emit values on change instead of blur, but I just wanted to showcase the UX)