From 7c38f751f2731fd51dfb1470a58295abd824061d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 6 Jul 2023 13:22:15 +0200 Subject: [PATCH] Fix HeaderPicker/AvatarPicker for missing images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../features/edit-profile/components/header-picker.tsx | 8 +++++++- app/soapbox/utils/accounts.ts | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/edit-profile/components/header-picker.tsx b/app/soapbox/features/edit-profile/components/header-picker.tsx index bb3b72054..8339f95ff 100644 --- a/app/soapbox/features/edit-profile/components/header-picker.tsx +++ b/app/soapbox/features/edit-profile/components/header-picker.tsx @@ -19,6 +19,12 @@ interface IMediaInput { const HeaderPicker = React.forwardRef(({ src, onChange, onClear, accept, disabled }, ref) => { const intl = useIntl(); + const handleClear: React.MouseEventHandler = (e) => { + e.stopPropagation(); + + onClear!(); + }; + return (