File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
block-editor/src/components/spacing-sizes-control
components/src/custom-select-control Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,8 @@ export default function SpacingInputControl( {
308308 size = { '__unstable-large' }
309309 onMouseOver = { onMouseOver }
310310 onMouseOut = { onMouseOut }
311+ onFocus = { onMouseOver }
312+ onBlur = { onMouseOut }
311313 />
312314 ) }
313315 </ >
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ export default function CustomSelectControl( props ) {
7979 value : _selectedItem ,
8080 onMouseOver,
8181 onMouseOut,
82+ onFocus,
83+ onBlur,
8284 __experimentalShowSelectedHint = false ,
8385 } = props ;
8486
@@ -103,6 +105,15 @@ export default function CustomSelectControl( props ) {
103105
104106 const [ isFocused , setIsFocused ] = useState ( false ) ;
105107
108+ function handleOnFocus ( e ) {
109+ setIsFocused ( true ) ;
110+ onFocus ( e ) ;
111+ }
112+ function handleOnBlur ( e ) {
113+ setIsFocused ( false ) ;
114+ onBlur ( e ) ;
115+ }
116+
106117 if ( ! __nextUnconstrainedWidth ) {
107118 deprecated (
108119 'Constrained width styles for wp.components.CustomSelectControl' ,
@@ -182,8 +193,8 @@ export default function CustomSelectControl( props ) {
182193 onMouseOver = { onMouseOver }
183194 onMouseOut = { onMouseOut }
184195 as = "button"
185- onFocus = { ( ) => setIsFocused ( true ) }
186- onBlur = { ( ) => setIsFocused ( false ) }
196+ onFocus = { handleOnFocus }
197+ onBlur = { handleOnBlur }
187198 selectSize = { size }
188199 __next36pxDefaultSize = { __next36pxDefaultSize }
189200 { ...getToggleButtonProps ( {
You can’t perform that action at this time.
0 commit comments