only hold to edit with left mouse

This commit is contained in:
Pas 2025-08-03 12:33:33 -06:00
parent 27fff44278
commit a1366a99d0
3 changed files with 15 additions and 6 deletions

View file

@ -330,8 +330,11 @@ export function BookmarksCarousel({
};
const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault(); // Prevent default mouse action
pressTimerRef.current = setTimeout(handleLongPress, LONG_PRESS_DURATION);
// Only trigger long press for left mouse button (button 0)
if (e.button === 0) {
e.preventDefault(); // Prevent default mouse action
pressTimerRef.current = setTimeout(handleLongPress, LONG_PRESS_DURATION);
}
};
const handleMouseUp = () => {

View file

@ -111,8 +111,11 @@ export function WatchingCarousel({
};
const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault(); // Prevent default mouse action
pressTimerRef.current = setTimeout(handleLongPress, LONG_PRESS_DURATION);
// Only trigger long press for left mouse button (button 0)
if (e.button === 0) {
e.preventDefault(); // Prevent default mouse action
pressTimerRef.current = setTimeout(handleLongPress, LONG_PRESS_DURATION);
}
};
const handleMouseUp = () => {

View file

@ -68,8 +68,11 @@ export function WatchingPart({
};
const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault(); // Prevent default mouse action
pressTimerRef.current = setTimeout(handleLongPress, LONG_PRESS_DURATION);
// Only trigger long press for left mouse button (button 0)
if (e.button === 0) {
e.preventDefault(); // Prevent default mouse action
pressTimerRef.current = setTimeout(handleLongPress, LONG_PRESS_DURATION);
}
};
const handleMouseUp = () => {