logoalt Hacker News

efortis01/14/20251 replyview on HN

I think the suggested mitigation will only work when the user double-clicks without moving the mouse.

So I'd try adding a small timeout when the tab is visible:

  document.addEventListener("visibilitychange", () => {
    if (!document.hidden)
      setTimeout(enableButtons, 200)
  })

Replies

efortis01/17/2025

and `disableButtons` on `document.hidden`