From 53ceb9de9d38ad670059b202a26c2eed9defa6eb Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 19 Mar 2021 15:41:34 +0100 Subject: [PATCH] Fixes #3457 - Ticket Zoom is not working correctly with iPhone --- .../app/controllers/_dashboard/first_steps_clues.coffee | 2 +- .../javascripts/app/controllers/agent_ticket_create.coffee | 2 +- app/assets/javascripts/app/controllers/ticket_zoom.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_dashboard/first_steps_clues.coffee b/app/assets/javascripts/app/controllers/_dashboard/first_steps_clues.coffee index 6143195eb..22f2e5bdb 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/first_steps_clues.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/first_steps_clues.coffee @@ -192,7 +192,7 @@ class App.FirstStepsClues extends App.Controller maxHeight = $(window).height() # try to place it parallel to the larger side - if target.height > target.width && window.matchMedia('(min-width: 768px').matches + if target.height > target.width && window.matchMedia('(min-width: 768px)').matches # try to place it aside # prefer right if target.right + modal.width <= maxWidth diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee index 5786cf3a1..987b49ca1 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee @@ -173,7 +173,7 @@ class App.TicketCreate extends App.Controller @controllerBind('ticket_create_rerender', (template) => @renderQueue(template)) # initially hide sidebar on mobile - if window.matchMedia('(max-width: 767px').matches + if window.matchMedia('(max-width: 767px)').matches @sidebar.addClass('is-closed') @sidebarSpacer.addClass('is-closed') diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index fdb1ff1c5..7eae1ab99 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -249,7 +249,7 @@ class App.TicketZoom extends App.Controller App.OnlineNotification.seen('Ticket', @ticket_id) # initially hide on mobile - if window.matchMedia('(max-width: 767px').matches + if window.matchMedia('(max-width: 767px)').matches @el.find('.tabsSidebar').addClass('is-closed') @el.find('.tabsSidebar-sidebarSpacer').addClass('is-closed')