Skip to content

Commit 0e1bde0

Browse files
committed
fix popover on close
1 parent 2ad2fcc commit 0e1bde0

File tree

1 file changed

+1
-1
lines changed
  • src/components/block-styles-control

1 file changed

+1
-1
lines changed

src/components/block-styles-control/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ export const BlockStylesControl = props => {
156156
if ( ! openPopover && ! popoverOnCloseRef.current ) {
157157
setOpenPopover( true )
158158
}
159-
popoverOnCloseRef.current = false
160159
} }
161160
ref={ buttonRef }
162161
>
@@ -191,6 +190,7 @@ export const BlockStylesControl = props => {
191190
setOpenPopover( false )
192191
// This prevents the popover from reopening if the button was clicked
193192
popoverOnCloseRef.current = true
193+
setTimeout( () => popoverOnCloseRef.current = false, 100 )
194194
} }
195195
anchor={ buttonRef.current }
196196
placement="bottom-end"

0 commit comments

Comments
 (0)