-
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
Rehabilitate drag gesture in LineHeightControl
#38930
Conversation
Size Change: +10 B (0%) Total Size: 1.15 MB
ℹ️ View Unchanged
|
Interesting, it was working before the I don't necessarily disagree with it not being a preferred mode of adjusting line-height, but I think I'd lean towards the consistency argument more. It would probably be better for user expectations if all NumberControls just had dragging, as long as it wasn't detrimental for any specific case. |
1ab934f
to
95c2dd4
Compare
LineHeightControl
LineHeightControl
Good call @mirka! Indeed, it was due to the library upgrade. I've updated the PR title, description and implementation to restore the drag gesture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, confirmed fixed in Chrome/Firefox/Safari. Thanks!
95c2dd4
to
d6c4cb5
Compare
With #37164
LineHeightControl
became based onNumberControl
and inherited the latter’s ability to adjust its value via drag gestures. After the library upgrade in #38840, the drag gesture will error and this PR fixes it.Before, block crash when attempting to select line height value
line-height-control-drag-crash.mp4
Error details
The error:
[Error] TypeError: undefined is not an object (evaluating 'action.payload.event.nativeEvent.inputType')
Stemming from this statement:
gutenberg/packages/block-editor/src/components/line-height-control/index.js
Lines 63 to 65 in 1d7fa7a
Testing Instructions
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).