-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[ Latest Posts ] Max. number of words control doesn't react to keyboard input #21549
Comments
I tested this and can confirm this is a bug. |
It’s happening because <RangeControl
min={ MIN_EXCERPT_LENGTH }
max={ MAX_EXCERPT_LENGTH }
/> has 10-100 set as lower and upper bounds. Whenever you try to go single digit it would prevent you from typing. Same goes when you exceed 100. I was thinking maybe to make it from 1-100 because it would make fixing ones easier and also maybe show a tooltip whenever an invalid number is typed. Also when should a fallback value be set? If there’s no lower bound, emptying the field is allowed, which currently automatically sets it to 50. |
@kirilzh I seem to recall that the component previously had built-in logic which would allow for temporary "violations" of the validation. It was implemented in #12952, I believe (cc @jorgefilipecosta). It looks like the changes in the refactoring in #19916 removed some of the logic around this, perhaps inadvertently regressing this intended behavior: cc @ItsJonQ With a fix, it would be good to have some automated tests which verify this behavior, to avoid potential future regressions. |
@aduth Thank you for the heads up! I wasn't aware of this use case. I'll look into it now! |
Just submitted a PR for the fix 🙏 |
Describe the bug
The default value for excerpt display is 55 words. There are three methods available, it seems, to modify that number in the sidebar
The third method, typing in a new value, doesn't work.
To reproduce
Steps to reproduce the behavior:
Expected behavior
I would have expected that I would be able to modify the number by typing in the right value.
Screenshots
Desktop (please complete the following information):
Additional context
Gutenberg 7.8.1
WordPress 5.4
The text was updated successfully, but these errors were encountered: