How to prevent duplicate click-type events?
I have an ongoing issue with users clicking on buttons and intermittently generating duplicate events. I've been using a variety of events to catch the clicks sooner rather than wait the 300 msec (like vmousedown), but this most recently happened with a vclick event.
Since it's obvious that neither jQuery or jQM is doing anything to prevent this, and it's also not a bug in those due to the uncommon nature of it (I can replicate it now and then, but it takes lots of attempts to catch it once), I'm assuming that it's due to something happening in the user-to-screen interaction that I can't stop, so I need to handle it in my code.
Has anyone figured out a good way to do this, or maybe I'm missing something and there actually is a problem with jQM? My method seems rather crude: I set a variable like "btnWasClicked" to false, and then in the method that handles the click I cancel the handling if it's true, and if it's false I set it to true and proceed, only setting it to false at the end of the event. I could adjust on the backend too but that gets pretty tedious.