Short description of issue
No way to revert input fields to their original default state
When users clear an input (number input in this example) in the theme editor, it doesn’t go back to blank, it becomes 0. That’s confusing, because the user might just leave it empty, not realizing it actually outputs 0.
It would make things way easier if the input just reverted to blank, and we handled that logic in the theme instead. Or just some consistent way of knowing if the input is blank or actually has a input. We can set inputs as blank from the theme side, by leaving the default empty, so why can’t the users?
Example: a max width starts at 100 [unit] by default. The user changes it to 20, then removes the value, now it’s 0. They changed it a while ago and don’t remember what the default was, so they have to test it out, but they never really know what the original value actually was.
Would be nice if there was a simple way to revert settings, like a small “reset to default” button or being able to option-click the label to reset it.
Or is there a specific reason it’s implemented this way? I’d love to understand the reasoning behind it.
Reproduction steps
- Add a number input to a section or block without setting a default value.
- In the theme editor, change the value.
- Remove the value so the input is blank.
- The input now outputs 0 instead of reverting to blank.
Additional info
This happens with any number input that doesn’t have a default value set. It makes it unclear whether the user actually entered 0 or just cleared the field. Ideally, the input should revert to blank so themes can handle the fallback logic.
What type of topic is this
General discussion