From 8a42ec4f7b1011821e93fc43f694943ec4703c6f Mon Sep 17 00:00:00 2001 From: Romit Choudhary Date: Wed, 28 Jul 2021 16:05:34 +0200 Subject: [PATCH] Fixes #3449 - Cannot select multiple tickets in ticket overview with shift+click in Firefox --- .../_ui_element/user_permission.coffee | 2 +- app/assets/stylesheets/zammad.scss | 2 +- .../agent_ticket_overview_level0_test.rb | 20 +++++++++---------- .../maintenance_session_message_test.rb | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_ui_element/user_permission.coffee b/app/assets/javascripts/app/controllers/_ui_element/user_permission.coffee index eb6c3cd4b..f6470f98c 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/user_permission.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/user_permission.coffee @@ -82,7 +82,7 @@ class App.UiElement.user_permission throttled = _.throttle( (e) -> input = $(@).find('input') - upcoming_state = !input.prop('checked') + upcoming_state = if $(e.target).is(':checkbox') then input.prop('checked') else !input.prop('checked') value = input.val() if value is 'full' and upcoming_state is true diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index bd0f36ead..82b143649 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -1444,9 +1444,9 @@ td .icon-trash { input[type="checkbox"], input[type="radio"] { - pointer-events: none; position: absolute; opacity: 0; + cursor: pointer; &:disabled ~ .icon { opacity: 0.33; diff --git a/test/browser/agent_ticket_overview_level0_test.rb b/test/browser/agent_ticket_overview_level0_test.rb index cd8344869..28bac9894 100644 --- a/test/browser/agent_ticket_overview_level0_test.rb +++ b/test/browser/agent_ticket_overview_level0_test.rb @@ -46,17 +46,17 @@ class AgentTicketOverviewLevel0Test < TestCase # select both via bulk action click( - css: %(.content.active table tr td input[value="#{ticket1[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket1[:id]}"]), fast: true, ) # scroll to reply - needed for chrome scroll_to( position: 'top', - css: %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket2[:id]}"]), ) click( - css: %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket2[:id]}"]), fast: true, ) @@ -263,17 +263,17 @@ class AgentTicketOverviewLevel0Test < TestCase # select both via bulk action click( - css: %(.content.active table tr td input[value="#{ticket1[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket1[:id]}"]), fast: true, ) # scroll to reply - needed for chrome scroll_to( position: 'top', - css: %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket2[:id]}"]), ) click( - css: %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket2[:id]}"]), fast: true, ) @@ -411,17 +411,17 @@ class AgentTicketOverviewLevel0Test < TestCase # select both via bulk action click( - css: %(.content.active table tr td input[value="#{ticket1[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket1[:id]}"]), fast: true, ) # scroll to reply - needed for chrome scroll_to( position: 'top', - css: %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket2[:id]}"]), ) click( - css: %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{ticket2[:id]}"]), fast: true, ) @@ -574,7 +574,7 @@ class AgentTicketOverviewLevel0Test < TestCase # then select the ticket that we do not have change rights to scroll_to( position: 'top', - css: %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"] + .icon-checkbox.icon-unchecked), + css: %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"]), ) check( css: %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"]), diff --git a/test/browser/maintenance_session_message_test.rb b/test/browser/maintenance_session_message_test.rb index aadb07f22..ce40442f2 100644 --- a/test/browser/maintenance_session_message_test.rb +++ b/test/browser/maintenance_session_message_test.rb @@ -147,7 +147,7 @@ class MaintenanceSessionMessageTest < TestCase ) click( browser: browser1, - css: '.content.active .js-Message input[name="reload"] + .icon-checkbox.icon-unchecked', + css: '.content.active .js-Message input[name="reload"]', ) click( browser: browser1,