Fixes #3736 - scrollPageHeader disappears when answering via email.

This commit is contained in:
Rolf Schmidt 2021-09-13 12:56:16 +01:00 committed by Thorsten Eckel
parent 2f72ac96d0
commit 85cee64c73
2 changed files with 23 additions and 2 deletions

View file

@ -454,8 +454,10 @@ class App.TicketZoom extends App.Controller
App.TaskManager.touch(@taskKey) App.TaskManager.touch(@taskKey)
if !@renderDone if !@renderDone
@renderDone = true @renderDone = true
@autosaveLast = {} @autosaveLast = {}
@scrollHeaderPos = undefined
elLocal = $(App.view('ticket_zoom') elLocal = $(App.view('ticket_zoom')
ticket: @ticket ticket: @ticket
nav: @nav nav: @nav

View file

@ -270,6 +270,25 @@ RSpec.describe 'Ticket zoom', type: :system do
end end
end end
end end
context 'scrollPageHeader disappears when answering via email #3736' do
let(:ticket) do
ticket = create(:ticket, group: Group.first)
create_list(:ticket_article, 15, ticket: ticket)
ticket
end
before do
visit "ticket/zoom/#{ticket.id}"
end
it 'does reset the scrollPageHeader on rerender of the ticket' do
select User.find_by(email: 'admin@example.com').fullname, from: 'Owner'
find('.js-textarea').send_keys('test 1234')
find('.js-submit').click
expect(page).to have_selector('div.scrollPageHeader .js-ticketTitleContainer')
end
end
end end
describe 'delete article', authenticated_as: :authenticate do describe 'delete article', authenticated_as: :authenticate do