Hacker News new | ask | show | jobs
by anuila 2053 days ago
This is something I usually take care of by throttling the relevant event listeners (in an AJAXed site) but the way this article puts it makes me wonder if this is as easy as globally disabling double clicks on links and buttons:

    document.addEventListener('dblclick', event => {
      if (event.target.closest('a, input, button'))
        event.preventDefault()
    })
1 comments

Would be careful with this (if it works), double clicking can be used to select text, which might turn out to be annoying when disabled in non-button inputs - certainly on mobile I use it a lot.