From 9dae9d5aaf53f4fbb6ce1c7a0c0a83ed7a6624d4 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Fri, 17 Mar 2023 11:39:23 +1000 Subject: [PATCH] LineHeightControl: Make spin buttons adjust from placeholder value --- .../src/components/line-height-control/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/line-height-control/index.js b/packages/block-editor/src/components/line-height-control/index.js index 670d6fac37e8df..61e0c4a3f32893 100644 --- a/packages/block-editor/src/components/line-height-control/index.js +++ b/packages/block-editor/src/components/line-height-control/index.js @@ -84,6 +84,15 @@ const LineHeightControl = ( { ? undefined : { marginBottom: 24 }; + const handleOnChange = ( nextValue, { event } ) => { + if ( event.type === 'click' ) { + onChange( adjustNextValue( nextValue, false ) ); + return; + } + + onChange( nextValue ); + }; + return (