-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input Fields: Unit jumps to px when set to 0 #51616
Comments
Thanks for reporting @hanneslsm, I am able to confirm as well. |
I just saw this happens also in the dimension controls (padding) for a button in the global styles. I guess this is not an issue of the spacer then but of the input field. |
I found a better fix for the spacer block height/width issue. The root cause was in packages/components/src/unit-control/index.tsx, where the unit was dropped when the value was empty. BeforeonChangeProp?.( '', changeProps ); AfteronChangeProp?.( `0${unit}`, changeProps ); This change ensures the unit is preserved, preventing it from resetting when the value is empty. cc: @mikachan @hanneslsm |
Description
see below
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Screen.Recording.2023-06-18.at.09.54.34.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: