I actually added protections in some of our internal software against that recently.
People (professionals with a lot of experience) would open orders or product sheets twice (two new tabs) and it created issues. So now, you can't double click.
Once you click something, it is disabled for a few seconds.
I still hear double clicks, but now it doesn't create any bugs.
That's a feature, not a bug. One of the things I dislike about Chrome is this tendency to auto-close two or three tabs if you cannot easily control how many times you click rapidly. That is, I can somewhat reliably double click, but fairly often an intended single click becomes a double click instead, or a double becomes a triple. (I thought my father had a lot of trouble learning the difference between single and double click back in the 90s, even while he protested that he knew the difference, but now I totally understand why he wasn't following directions...). Having the next tab's close button typically not land under the pointer prevents this from happening most of the time, but I'm glad they put some thought into this and enforced a delay before the second click would close the tab.
My guess is that there are more people accidentally closing extra tabs than people who want to close a lot of tabs they haven't seen in a while.
Indeed. That's how most desktop browsers handle double-click -- it only happens when the first click wasn't handled (preventDefault-ed). I guess they made this decision for usability reasons (double-tap-to-zoom should always work) but ended up creating a different problem instead.
There are many good reasons to limit users and user interactions to the appropriate existing context. A "double-click" is a Windows metaphor and not a Web metaphor and should ignored if not actively discouraged. I have nothing against Windows but it's simply not appropriate to extend its behavior to the web.
I don't disagree with the premise that double clicks are a broken thing on the web. There's too much of a cognitive shift between "the web" and "everything else" where double clicks are either a bad thing to do or a required action to complete tasks. Like the author said, even tech savvy people will double click things that they wouldn't need to.
But, saying that idempotency is hard and thus we should build features to get around it.. that seems wrong to me. The web is inherently a distributed system and you're going to have concurrent requests and weird edge cases that arise in those situations. The right way to handle that isn't to bandaid it with disabling client side behavior. That just hides to problem. Your server is the place to handle it.[1]
And, it really isn't that hard either. It's just a couple extra validations on your input before you do a write. There are places where it is more difficult but still not overly complicated to implement.
[1] Dogmatism alert. Of course, there are exceptions to everything that's a 'best practice'. Here, I'm just talking about disabling double-click as a general solution for the web to a concurrency problem.
Interestingly, the only persons I've ever seen doubleclicking in the web are from my parent generation (>60, >70 years old).
Also since 2015 the mobile adaption increased more and more. On mobile devices, the "double tap" concept never was very important, I think (at least not in the web context).
Therefore my feeling is that this issue is mostly a thing from the past.
Nevertheless I sometimes see forms which implement this "disable after submission" principle. Especially when it's about money, such as when booking a hotel or flight, etc.
Annoying and redundant. I often find myself clicking on a page to either force focus to that window, or to select text to act as a highlight so I can find my place easily later on.
This means any accidental doubleclicks are launching new tabs or windows that I don't want.
If I want a definition of a word, I have more global, convenient ways of handling that.
Now, if instead double-clicking did something like spawn a topic search through NYT or news.google.com or something, without the hassle of underlining every word, I can imagine that would at least seem useful.
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()
})
I'm not sure why you need to wait for potential double taps on clickable elements anyway, couldn't you just have clickable elements not be double tappable?
Yes, that is true and one of the biggest limitations of the system currently, this is why it's mostly suited for sites that don't load dynamic data (eg. landing pages, news sites, blogs, etc.)
Currently to avoid executing events twice, you can disable action replay on a specific button (it will show the click event but not replay the action).
I have always considered implementing or using something like rrweb but the performance and privacy implications are huge. Still a lot of customers would prefer that, mostly for the ecommerce cases you mentioned.
the misclick because of slow loading/moving components drives me batshit crazy. esp when the click loads a new page: need to go back, wait.. safe to click it now? oops nope!! repeat
I agree with the complaint, and this is a widespread UI flaw that extends far beyond Apple, however I think his proposed solution isn't the best.
My generalized solution that would work in any interface layout is to add new interface elements as disabled, and leave them disabled for maybe 1 full second. This would eliminate 90% of false clicks on fast moving popups.
I doubleclick text and blank areas constantly I realize this probably drives people insane, but while I'm reading a paragraph I will keep doubleclicking to select and deselect the text over and over. Somehow it helps my concentration.. I do this with code as well.
That's why I have bookmarklets to disable the dictionary lookups and other what I consider annoyances on sites that implement those features on doubleclick and yes I've been told that I'm crazy on many occasions.
IMO disabling buttons causes more trouble than it's worth - you can never guarantee the user hasn't clicked twice (because don't forget the code that disabling the button in the first place is relying on an event firing that tells you the button was clicked - this doesn't mean 2 events can't be queued before the event handler is called), and then you need a whole chunk of code around re-enabling the button depending on what has happened after the fact which is then a big source of bugs.
People (professionals with a lot of experience) would open orders or product sheets twice (two new tabs) and it created issues. So now, you can't double click.
Once you click something, it is disabled for a few seconds.
I still hear double clicks, but now it doesn't create any bugs.
reply