mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-02-18 13:29:36 +01:00
fix: make link icon clickable in mobile (#4736)
This commit is contained in:
parent
c3f6d6d344
commit
9be6243873
@ -1524,7 +1524,20 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
|
|
||||||
removePointer = (event: React.PointerEvent<HTMLElement> | PointerEvent) => {
|
removePointer = (event: React.PointerEvent<HTMLElement> | PointerEvent) => {
|
||||||
this.lastPointerUp = event;
|
this.lastPointerUp = event;
|
||||||
|
if (this.isMobile) {
|
||||||
|
const scenePointer = viewportCoordsToSceneCoords(
|
||||||
|
{ clientX: event.clientX, clientY: event.clientY },
|
||||||
|
this.state,
|
||||||
|
);
|
||||||
|
const hitElement = this.getElementAtPosition(
|
||||||
|
scenePointer.x,
|
||||||
|
scenePointer.y,
|
||||||
|
);
|
||||||
|
this.hitLinkElement = this.getElementLinkAtPosition(
|
||||||
|
scenePointer,
|
||||||
|
hitElement,
|
||||||
|
);
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
this.hitLinkElement &&
|
this.hitLinkElement &&
|
||||||
!this.state.selectedElementIds[this.hitLinkElement.id]
|
!this.state.selectedElementIds[this.hitLinkElement.id]
|
||||||
|
Loading…
Reference in New Issue
Block a user