Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

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

Aakansha Doshi38e8ae46c989
diff --git a/src/components/App.tsx b/src/components/App.tsx
index fc426a8916..89e3a94575 100644
--- a/src/components/App.tsx
+++ b/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 =