From 38e8ae46c989a3b996a337d8753e468fd393080c Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Thu, 18 Aug 2022 13:40:26 +0530 Subject: [PATCH] fix: check if hitting link in handleSelectionOnPointerDown (#5589) fix: check if hitting link in handleSelectionOnPoiinterDown --- src/components/App.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index fc426a89..89e3a945 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -3660,14 +3660,14 @@ class App extends React.Component { if (pointerDownState.hit.element) { // Early return if pointer is hitting link icon - if ( - isPointHittingLinkIcon( - pointerDownState.hit.element, - this.state, - [pointerDownState.origin.x, pointerDownState.origin.y], - this.device.isMobile, - ) - ) { + const hitLinkElement = this.getElementLinkAtPosition( + { + x: pointerDownState.origin.x, + y: pointerDownState.origin.y, + }, + pointerDownState.hit.element, + ); + if (hitLinkElement) { return false; } pointerDownState.hit.hasHitElementInside =