Skip to content

Commit

Permalink
Handle case when the dropdown is closed without triggering a blur event
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Nov 2, 2023
1 parent d856bd6 commit f432c1b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ export default function PageSlug( { postType, postId } ) {
popoverProps={ popoverProps }
focusOnMount
ref={ setPopoverAnchor }
onClose={ () => {
if ( forceEmptyField ) {
onSlugChange( cleanForSlug( savedSlug ) );
setForceEmptyField( false );
}
} }
renderToggle={ ( { onToggle } ) => (
<Button
className="edit-site-summary-field__trigger"
Expand Down

0 comments on commit f432c1b

Please sign in to comment.