Преглед изворни кода

fix: check if hitting link in handleSelectionOnPointerDown (#5589)

fix: check if hitting link in handleSelectionOnPoiinterDown
Aakansha Doshi пре 2 година
родитељ
комит
38e8ae46c9
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 8
      src/components/App.tsx

+ 8 - 8
src/components/App.tsx

@@ -3660,14 +3660,14 @@ class App extends React.Component<AppProps, AppState> {
 
         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 =