diff --git a/dotcom-rendering/src/components/InteractivesDisableArticleSwipe.importable.tsx b/dotcom-rendering/src/components/InteractivesDisableArticleSwipe.importable.tsx index c34983d2b98..9e867b20961 100644 --- a/dotcom-rendering/src/components/InteractivesDisableArticleSwipe.importable.tsx +++ b/dotcom-rendering/src/components/InteractivesDisableArticleSwipe.importable.tsx @@ -3,12 +3,21 @@ import { useEffect } from 'react'; import { getInteractionClient } from '../lib/bridgetApi'; export const InteractivesDisableArticleSwipe = () => { - useEffect(() => { - void getInteractionClient() + const onTouchStart = () => { + getInteractionClient() .disableArticleSwipe(true) .catch((error) => { - log('dotcom', 'disableArticleSwipe failed:', error); + log('dotcom', 'disableArticleSwipe failed', error); }); + }; + useEffect(() => { + document.addEventListener('touchstart', onTouchStart, { + passive: true, + }); + + return () => { + document.removeEventListener('touchstart', onTouchStart); + }; }, []); return null; };