File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/components/block-styles-control Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export const BlockStylesControl = props => {
4848
4949 const prevBlockStyleRef = useRef ( null )
5050 const buttonRef = useRef ( null )
51+ const popoverOnCloseTimeout = useRef ( null )
5152 const popoverOnCloseRef = useRef ( false )
5253
5354 const mainClasses = classnames ( [
@@ -190,10 +191,10 @@ export const BlockStylesControl = props => {
190191 setOpenPopover ( false )
191192 // This prevents the popover from reopening if the button was clicked
192193 popoverOnCloseRef . current = true
193- setTimeout ( ( ) => popoverOnCloseRef . current = false , 100 )
194+ clearTimeout ( popoverOnCloseTimeout . current )
195+ popoverOnCloseTimeout . current = setTimeout ( ( ) => popoverOnCloseRef . current = false , 100 )
194196 } }
195197 anchor = { buttonRef . current }
196- placement = "bottom-end"
197198 offset = { 8 }
198199 >
199200 < PanelBody >
You can’t perform that action at this time.
0 commit comments