fix(mobile/split): link context menu opening in the wrong split

This commit is contained in:
Elian Doran
2025-12-01 15:23:57 +02:00
parent 309fbab2e6
commit a718908385
2 changed files with 22 additions and 11 deletions

View File

@@ -19,3 +19,9 @@ export function onWheelHorizontalScroll(event: WheelEvent) {
event.stopImmediatePropagation();
(event.currentTarget as HTMLElement).scrollLeft += event.deltaY + event.deltaX;
}
export function getClosestNtxId(element: HTMLElement) {
const closestNtxEl = element.closest<HTMLElement>("[data-ntx-id]");
if (!closestNtxEl) return null;
return closestNtxEl.dataset.ntxId ?? null;
}