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
LineHeightControlLineHeightControl
|
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. |
mirka
left a comment
There was a problem hiding this comment.
Very nice, confirmed fixed in Chrome/Firefox/Safari. Thanks!
95c2dd4 to
d6c4cb5
Compare
With #37164
LineHeightControlbecame based onNumberControland 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.jsfiles for terms that need renaming or removal).