fix long press to work only on left click (#1493)

This commit is contained in:
jeffvli
2026-01-04 01:53:34 -08:00
parent af055ab6dd
commit 3122c1a058
2 changed files with 6 additions and 3 deletions
@@ -490,9 +490,6 @@ export const ItemTableListColumn = (props: ItemTableListColumn) => {
case TableColumn.TRACK_NUMBER:
return <NumericColumn {...props} {...dragProps} controls={controls} type={type} />;
case TableColumn.YEAR:
return <YearColumn {...props} {...dragProps} controls={controls} type={type} />;
case TableColumn.DATE_ADDED:
return <DateColumn {...props} {...dragProps} controls={controls} type={type} />;
@@ -551,6 +548,9 @@ export const ItemTableListColumn = (props: ItemTableListColumn) => {
case TableColumn.USER_RATING:
return <RatingColumn {...props} {...dragProps} controls={controls} type={type} />;
case TableColumn.YEAR:
return <YearColumn {...props} {...dragProps} controls={controls} type={type} />;
default:
return <DefaultColumn {...props} {...dragProps} controls={controls} type={type} />;
}
+3
View File
@@ -56,6 +56,9 @@ export const useLongPress = <T extends HTMLElement = HTMLElement>({
const handleMouseDown = useCallback(
(event: React.MouseEvent) => {
if (event.button !== 0) {
return;
}
event.preventDefault();
start(event as React.MouseEvent<T>);
},