Gutenberg: Spacer Block: Difficult to enter values directly into input field

Created on 10 Aug 2020  路  9Comments  路  Source: WordPress/gutenberg

Is your feature request related to a problem? Please describe.
Yes. If I try to empty the input field to directly put my height numbers into it (via num keys), it jumps back to 20px.
This isn't very convenient. Test:

  1. Create a spacer block.
  2. Mark the number in the input field.
  3. Try to write like 500 via num keys. The field jumps to 200.
    (Or try to change the height from 20 to 40 only with keyboard input, which is a common task on daily basis.)

Describe the solution you'd like
As long I have focus on the field it shouldn't update itself to the min height.
Currently it's updating on input change.

If I don't set any number or a number below min height and focus is lost, it should update itself to the min height.

Describe alternatives you've considered
There is no other way, just don't block direct keyboard input for number input fields.

Accessibility (a11y) [Block] Spacer [Status] In Progress [Type] Bug

Most helpful comment

I've just renamed this to make it easier to find, as there have been a couple of duplicate issues created.

All 9 comments

I've been looking into this and think I've got it licked. Going to do a bit more testing. A PR should follow shortly.

I've just renamed this to make it easier to find, as there have been a couple of duplicate issues created.

Not allowing users to type the desired value is an accessibility issue. Adding the related label.

Removed from 5.6 @tellthemachines? Everyday I curse this bug. Is there anything with my limited skills I can do to help get this fixed?

@tellthemachines I thought you said all the issues that were set on the 5.6 milestone were moved to the "5.6 must have" project board but I don't see this issue in the board. Maybe I'm missing something but at this point I'm not sure if I should check all the issues previously set on the 5.6 milestone 馃檪 When you have a chance, can you please shed some light on the process followed here?

@thetwopct @afercia I'm sorry, must have missed this one. I went through all the issues in the milestone, and thought I'd added all of them to the project board 馃槙
The only ones I explicitly didn't add were already either in the Navigation screen or the Widgets screen boards, which are also targeted for 5.6. This issue isn't related to either of those, so was obviously an oversight on my part.

Thanks for double-checking!

It seems adding some context here could be helpful. This affects any block using RangeControl and appears to be a regression of #21549. You can confirm this by testing other blocks or playing with RangeControl in Storybook.

Here are the changes that caused the regression. I found it humorous that the current regression came from changes by the same author who made the fix for the previous regression. If only @aduth's suggestion of adding a test to prevent future regressions had been heeded.

Closed prematurely, the PR that closed this has now been reverted due to some other issues it introduced.

Was this page helpful?
0 / 5 - 0 ratings