logoalt Hacker News

gravyesterday at 7:51 PM1 replyview on HN

Fix:

  (() => {
  const KILL = ['wheel', 'mousewheel', 'DOMMouseScroll', 'touchmove'];
  const block = e => e.stopImmediatePropagation();
  for (const t of KILL) {
    window.addEventListener(t, block, { capture: true, passive: true });
    document.addEventListener(t, block, { capture: true, passive: true });
  }
  document.documentElement.classList.remove('lenis','lenis-smooth','lenis-scrolling','lenis-stopped');
  console.log('Scroll hijack disabled — native scrolling restored.');
  })();

Replies

sethops1yesterday at 9:18 PM

The fix is to close the tab.