mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-30 04:19:28 +00:00
fix(ui): restore download table sorting
This commit is contained in:
@@ -314,6 +314,18 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter }) => {
|
|||||||
if (distance < 5) return;
|
if (distance < 5) return;
|
||||||
gesture.active = true;
|
gesture.active = true;
|
||||||
suppressHeaderClickRef.current = true;
|
suppressHeaderClickRef.current = true;
|
||||||
|
const captureTarget = columnDragCaptureTargetRef.current;
|
||||||
|
if (captureTarget) {
|
||||||
|
try {
|
||||||
|
// Delay capture until the gesture is a real drag. A click on the
|
||||||
|
// sortable header button must retain its original target so the
|
||||||
|
// browser can dispatch the button click normally.
|
||||||
|
captureTarget.setPointerCapture(pointerId);
|
||||||
|
} catch {
|
||||||
|
// Window listeners below still handle browsers that reject capture
|
||||||
|
// after the pointer has already been cancelled.
|
||||||
|
}
|
||||||
|
}
|
||||||
const target = columnDragTargetRef.current;
|
const target = columnDragTargetRef.current;
|
||||||
const rect = target?.getBoundingClientRect();
|
const rect = target?.getBoundingClientRect();
|
||||||
if (!rect) return;
|
if (!rect) return;
|
||||||
@@ -372,16 +384,6 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter }) => {
|
|||||||
columnDragTargetRef.current = target;
|
columnDragTargetRef.current = target;
|
||||||
columnDragCaptureTargetRef.current = captureTarget;
|
columnDragCaptureTargetRef.current = captureTarget;
|
||||||
columnDragCapturePointerIdRef.current = pointerId;
|
columnDragCapturePointerIdRef.current = pointerId;
|
||||||
if (captureTarget) {
|
|
||||||
try {
|
|
||||||
// Capture on the stable grid parent, never on a column that is
|
|
||||||
// structurally moved during the live reorder.
|
|
||||||
captureTarget.setPointerCapture(pointerId);
|
|
||||||
} catch {
|
|
||||||
// Window listeners below still handle browsers that reject capture
|
|
||||||
// after the pointer has already been cancelled.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
columnDragLayoutRef.current = null;
|
columnDragLayoutRef.current = null;
|
||||||
dragGestureRef.current = {
|
dragGestureRef.current = {
|
||||||
key,
|
key,
|
||||||
|
|||||||
+1
-1
@@ -1956,7 +1956,7 @@ html[data-list-density="relaxed"] {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
font: inherit;
|
font: inherit;
|
||||||
text-align: inherit;
|
text-align: inherit;
|
||||||
cursor: inherit;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download-column-header-content > span {
|
.download-column-header-content > span {
|
||||||
|
|||||||
Reference in New Issue
Block a user