diff --git a/packages/components/src/mobile/link-settings/index.native.js b/packages/components/src/mobile/link-settings/index.native.js index 70b5a3b6e9201f..f373f54450317e 100644 --- a/packages/components/src/mobile/link-settings/index.native.js +++ b/packages/components/src/mobile/link-settings/index.native.js @@ -93,6 +93,7 @@ function LinkSettings( { const [ urlInputValue, setUrlInputValue ] = useState( '' ); const [ labelInputValue, setLabelInputValue ] = useState( '' ); const [ linkRelInputValue, setLinkRelInputValue ] = useState( '' ); + const onCloseSettingsSheetConsumed = useRef( false ); const prevEditorSidebarOpenedRef = useRef(); const { onHandleClosingBottomSheet } = useContext( BottomSheetContext ); @@ -174,6 +175,13 @@ function LinkSettings( { }, [ urlInputValue, labelInputValue, linkRelInputValue, setAttributes ] ); const onCloseSettingsSheet = useCallback( () => { + if ( onCloseSettingsSheetConsumed.current ) { + onCloseSettingsSheetConsumed.current = false; + return; + } + + onCloseSettingsSheetConsumed.current = true; + onSetAttributes(); if ( onClose ) {