Fixed issue #3375 - chat-no-jquery.js is dropping click binds/event listener after from web page

This commit is contained in:
Martin Edenhofer 2021-01-18 22:21:03 +01:00
parent c6fb3370e2
commit fdfb042398
3 changed files with 5 additions and 5 deletions

View file

@ -598,10 +598,10 @@ do(window) ->
renderBase: -> renderBase: ->
@el.remove() if @el @el.remove() if @el
@options.target.innerHTML += @view('chat')( @options.target.insertAdjacentHTML('beforeend', @view('chat')(
title: @options.title, title: @options.title,
scrollHint: @options.scrollHint scrollHint: @options.scrollHint
) ))
@el = @options.target.querySelector('.zammad-chat') @el = @options.target.querySelector('.zammad-chat')
@input = @el.querySelector('.zammad-chat-input') @input = @el.querySelector('.zammad-chat-input')
@body = @el.querySelector('.zammad-chat-body') @body = @el.querySelector('.zammad-chat-body')

View file

@ -1042,10 +1042,10 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal
if (this.el) { if (this.el) {
this.el.remove(); this.el.remove();
} }
this.options.target.innerHTML += this.view('chat')({ this.options.target.insertAdjacentHTML('beforeend', this.view('chat')({
title: this.options.title, title: this.options.title,
scrollHint: this.options.scrollHint scrollHint: this.options.scrollHint
}); }));
this.el = this.options.target.querySelector('.zammad-chat'); this.el = this.options.target.querySelector('.zammad-chat');
this.input = this.el.querySelector('.zammad-chat-input'); this.input = this.el.querySelector('.zammad-chat-input');
this.body = this.el.querySelector('.zammad-chat-body'); this.body = this.el.querySelector('.zammad-chat-body');

File diff suppressed because one or more lines are too long