I’ve looked into the code because I was curious if this is easy to fix. I’ve found that there is actually code that is supposed to prevent this (which probably makes this a bug report and not a feature request ):
Apparently, the 120ms delay was a bit too optimistic. The following debug code shows the delay that I’m getting when double-clicking:
zammad@martin ~ (develop) % git diff
diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee
index f5da7281e..ab60d81fc 100644
--- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee
+++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee
@@ -293,6 +293,9 @@ class ArticleViewItem extends App.ObserverController
# by adding a delay to the toggle
delay = 120
+ diff = +new Date - @lastClick
+ console.log("toggleMetaWithDelay - diff: " + diff)
+
if @lastClick and +new Date - @lastClick < delay
clearTimeout(@toggleMetaTimeout)
else
The high values are the delays between my double-clicks, and the low values are the delays between the separate clicks that constitute a double-click. As you can see, I haven’t actually managed to make a double-click with a delay of <= 120ms. I went ahead and raised the delay a bit:
zammad@martin.mein-iserv.de ~ (develop) % git diff
diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee
index f5da7281e..b13437200 100644
--- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee
+++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee
@@ -291,7 +291,7 @@ class ArticleViewItem extends App.ObserverController
toggleMetaWithDelay: (e) =>
# allow double click select
# by adding a delay to the toggle
- delay = 120
+ delay = 300
if @lastClick and +new Date - @lastClick < delay
clearTimeout(@toggleMetaTimeout)
This seems to greatly improve the situation, although it does of course result in a slightly higher delay when you actually want to expand the detail view.
Haha oh wow, never experienced that by now.
Was going to ask what Browser you use but then noticed, that your double click is “slow” (well slower than mine).
If I force myself into slow double clicking, I can verify that.
Would you mind creating an issue and, maybe, also a PR?