From b112ea68a9b4ba76d5642bc4258abe1269d27d93 Mon Sep 17 00:00:00 2001 From: Martin von Wittich Date: Fri, 24 May 2019 16:02:25 +0200 Subject: [PATCH] PR #2590 - Fixes #2589 Detail mode in ticket article view is incorrectly triggered when single-click de-selecting a text selection --- .../app/controllers/ticket_zoom/article_view.coffee | 5 +++++ 1 file changed, 5 insertions(+) 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 3fe98f590..874d05e7f 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee @@ -348,6 +348,11 @@ class ArticleViewItem extends App.ObserverController # by adding a delay to the toggle delay = 300 + article = $(e.target).closest('.ticket-article-item') + if @elementContainsSelection(article.get(0)) + @stopPropagation(e) + return false + if @lastClick and +new Date - @lastClick < delay clearTimeout(@toggleMetaTimeout) else