From c1580dae1ffd2f3c6ec6ba92e567c83594ce97fb Mon Sep 17 00:00:00 2001 From: GitStart <1501599+gitstart@users.noreply.github.com> Date: Tue, 25 Jul 2023 17:47:26 +0300 Subject: [PATCH] fix: ALT text entered in the compose dialog is erased when you press "Edit" again (#1054) --- src/view/com/modals/EditImage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/modals/EditImage.tsx b/src/view/com/modals/EditImage.tsx index 09ae0194..a4e06b95 100644 --- a/src/view/com/modals/EditImage.tsx +++ b/src/view/com/modals/EditImage.tsx @@ -62,7 +62,7 @@ export const Component = observer(function ({image, gallery}: Props) { const [position, setPosition] = useState( image.attributes.position, ) - const [altText, setAltText] = useState('') + const [altText, setAltText] = useState(image?.altText ?? '') const onFlipHorizontal = useCallback(() => { image.flipHorizontal()