From b858b97742baf80ee543bd6d9c4c79c2d4d79537 Mon Sep 17 00:00:00 2001 From: Bola Ahmed Buari Date: Fri, 4 Feb 2022 18:14:17 +0100 Subject: [PATCH] Fixes #3950 - Uncaught TypeError in ticket zoom highlighter --- .../app/controllers/ticket_zoom/highlighter.coffee | 2 ++ .../javascripts/app/views/layout_ref/ticket_zoom.jst.eco | 2 +- .../app/views/ticket_zoom/highlighter.jst.eco | 4 ++-- app/assets/stylesheets/zammad.scss | 9 +++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee index a9906f67d..e693777fd 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/highlighter.coffee @@ -212,6 +212,8 @@ class App.TicketZoomHighlighter extends App.Controller # - clears the selection toggleHighlightAtSelection: (article, article_id) => + return if !article + selection = rangy.getSelection() # activate selection background diff --git a/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco b/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco index fc260ebf1..ef343cb0c 100644 --- a/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco @@ -12,7 +12,7 @@