Revert "Follow up - f54df50 - Fixes #3040: Use focusout instead of click event to stabilize tests."

This reverts commit b828c7bda0.

It introduced a bug in the behavior of the reply input field. E.g. toggling the article type was no longer possible.
This commit is contained in:
Thorsten Eckel 2020-09-08 16:55:16 +02:00
parent 4d0707a938
commit 8749190a51

View file

@ -60,6 +60,7 @@ class App.TicketZoomArticleNew extends App.Controller
@setArticleTypePre(data.type.name, data.signaturePosition)
@openTextarea(null, true)
for key, value of data.article
if key is 'body'
@$("[data-name=\"#{key}\"]").html(value)
@ -149,9 +150,14 @@ class App.TicketZoomArticleNew extends App.Controller
if @subscribeIdTextModule
App.Ticket.unsubscribe(@subscribeIdTextModule)
$(window).off('click.ticket-zoom-select-type')
@releaseGlobalClickEvents()
releaseGlobalClickEvents: ->
$(window).off 'click.ticket-zoom-select-type'
$(window).off 'click.ticket-zoom-textarea'
render: ->
@releaseGlobalClickEvents()
ticket = App.Ticket.fullLocal(@ticket_id)
@html App.view('ticket_zoom/article_new')(
@ -511,7 +517,7 @@ class App.TicketZoomArticleNew extends App.Controller
options:
duration: duration
easing: 'easeOutQuad'
complete: => @textarea.off('focusout.ticket-zoom-textarea').on('focusout.ticket-zoom-textarea', @closeTextarea)
complete: => $(window).off('click.ticket-zoom-textarea').on('click.ticket-zoom-textarea', @closeTextarea)
@textBubble.velocity
properties:
@ -556,7 +562,7 @@ class App.TicketZoomArticleNew extends App.Controller
closeTextarea: =>
if !@textarea.text().trim() && !@attachments.length && not @isIE10()
@textarea.off('focusout.ticket-zoom-textarea')
$(window).off 'click.ticket-zoom-textarea'
@textarea.velocity
properties: