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

fix: check if hitting link in handleSelectionOnPoiinterDown
This commit is contained in:
Aakansha Doshi 2022-08-18 13:40:26 +05:30 committed by GitHub
parent ad0c4c4c78
commit 38e8ae46c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3660,14 +3660,14 @@ class App extends React.Component<AppProps, AppState> {
if (pointerDownState.hit.element) { if (pointerDownState.hit.element) {
// Early return if pointer is hitting link icon // Early return if pointer is hitting link icon
if ( const hitLinkElement = this.getElementLinkAtPosition(
isPointHittingLinkIcon( {
x: pointerDownState.origin.x,
y: pointerDownState.origin.y,
},
pointerDownState.hit.element, pointerDownState.hit.element,
this.state, );
[pointerDownState.origin.x, pointerDownState.origin.y], if (hitLinkElement) {
this.device.isMobile,
)
) {
return false; return false;
} }
pointerDownState.hit.hasHitElementInside = pointerDownState.hit.hasHitElementInside =