mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
Prevent the desktop context menu from appearing on mobile
This commit is contained in:
parent
622521ca0a
commit
4963142ed4
1 changed files with 6 additions and 4 deletions
|
|
@ -433,10 +433,12 @@ function SpaceTab({
|
|||
const handleContextMenu: MouseEventHandler<HTMLButtonElement> = (evt) => {
|
||||
evt.preventDefault();
|
||||
const cords = evt.currentTarget.getBoundingClientRect();
|
||||
setMenuAnchor((currentState) => {
|
||||
if (currentState) return undefined;
|
||||
return cords;
|
||||
});
|
||||
if (!isMobile) {
|
||||
setMenuAnchor((currentState) => {
|
||||
if (currentState) return undefined;
|
||||
return cords;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const longPressBinder = useLongPress(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue