Skip to content

Commit

Permalink
catch error with unsupported AbortSignal.any
Browse files Browse the repository at this point in the history
  • Loading branch information
usyless committed Jan 5, 2025
1 parent 349d2ca commit a1ed54a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/settings/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ if ((new URLSearchParams(window.location.search)).get('installed')) {
else overlay.style.marginTop = '';
};
overlay.style.transition = '0s';
window.addEventListener('pointermove', (ev) => {
overlay.style.marginTop = `${ev.clientY - e.clientY}px`;
}, {signal: moveController.signal});
window.addEventListener('pointerup', onExit, {once: true, signal: controller.signal});
window.addEventListener('pointercancel', onExit, {once: true, signal: controller.signal});
try {
window.addEventListener('pointermove', (ev) => {
overlay.style.marginTop = `${ev.clientY - e.clientY}px`;
}, {signal: AbortSignal.any([moveController.signal, controller.signal])});
} catch {console.error("AbortSignal.any not supported, ignoring dragging");}
}, {signal: controller.signal});
}

0 comments on commit a1ed54a

Please sign in to comment.