From ed992046cbd1e6b97e915a4d169df7323ca2c623 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 2 Jan 2025 02:41:42 +0100 Subject: [PATCH] Remove unintentional touch bindings Caused double clicks --- src/modules/chapter/components/cards/ChapterCard.tsx | 1 - src/modules/manga/components/MangaOptionButton.tsx | 2 -- src/modules/manga/components/TrackMangaButton.tsx | 1 - .../tracker/components/cards/SettingsTrackerCard.tsx | 6 +----- src/modules/tracker/components/cards/TrackerActiveCard.tsx | 4 ---- 5 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/modules/chapter/components/cards/ChapterCard.tsx b/src/modules/chapter/components/cards/ChapterCard.tsx index 350e6fb7..7b035ff1 100644 --- a/src/modules/chapter/components/cards/ChapterCard.tsx +++ b/src/modules/chapter/components/cards/ChapterCard.tsx @@ -185,7 +185,6 @@ export const ChapterCard: React.FC = (props: IProps) => { ref={menuButtonRef} {...bindTrigger(popupState)} onClick={(e) => handleClickOpenMenu(e, popupState.open)} - onTouchStart={(e) => handleClickOpenMenu(e, popupState.open)} aria-label="more" size="large" > diff --git a/src/modules/manga/components/MangaOptionButton.tsx b/src/modules/manga/components/MangaOptionButton.tsx index bad25b64..33ed83dc 100644 --- a/src/modules/manga/components/MangaOptionButton.tsx +++ b/src/modules/manga/components/MangaOptionButton.tsx @@ -84,7 +84,6 @@ export const MangaOptionButton = forwardRef( ref={ref} {...bindTriggerProps} onClick={handleClick} - onTouchStart={handleClick} aria-label="more" size="large" onMouseDown={preventDefaultAction} @@ -101,7 +100,6 @@ export const MangaOptionButton = forwardRef( ref={ref} {...bindTriggerProps} onClick={handleClick} - onTouchStart={handleClick} className="manga-option-button" size="small" variant="contained" diff --git a/src/modules/manga/components/TrackMangaButton.tsx b/src/modules/manga/components/TrackMangaButton.tsx index 289c4cb6..5ee224f5 100644 --- a/src/modules/manga/components/TrackMangaButton.tsx +++ b/src/modules/manga/components/TrackMangaButton.tsx @@ -56,7 +56,6 @@ export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Pick size="medium" disabled={trackerList.loading || !!trackerList.error} onClick={() => handleClick(popupState.open)} - onTouchStart={() => handleClick(popupState.open)} variant={trackersInUse.length ? 'contained' : 'outlined'} > {trackersInUse.length ? : } diff --git a/src/modules/tracker/components/cards/SettingsTrackerCard.tsx b/src/modules/tracker/components/cards/SettingsTrackerCard.tsx index e7249287..71282321 100644 --- a/src/modules/tracker/components/cards/SettingsTrackerCard.tsx +++ b/src/modules/tracker/components/cards/SettingsTrackerCard.tsx @@ -80,11 +80,7 @@ export const SettingsTrackerCard = ({ tracker }: { tracker: TTrackerSearch }) => {(popupState) => ( <> - onClick(popupState.open)} - // onTouchStart={() => onClick(popupState.open)} - > + onClick(popupState.open)}> { - onClick(); - popupState.open(); - }} > {t('global.button.remove')}