Just scroll to bottom if real content is higher then 100% of viewable area.
This commit is contained in:
parent
1f0a2b3e61
commit
7bd6731a23
1 changed files with 11 additions and 0 deletions
|
@ -417,6 +417,17 @@ class App.TicketZoom extends App.Controller
|
|||
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id })
|
||||
|
||||
scrollToBottom: =>
|
||||
|
||||
# because of .ticketZoom { min-: 101% } (force to show scrollbar to set layout correctly),
|
||||
# we need to check if we need to really scroll bottom, in case of content isn't really 100%,
|
||||
# just return (otherwise just a part of movable header is shown down)
|
||||
realContentHeight = 0
|
||||
realContentHeight += @$('.ticketZoom-controls').height()
|
||||
realContentHeight += @$('.ticketZoom-header').height()
|
||||
realContentHeight += @$('.ticket-article').height()
|
||||
realContentHeight += @$('.article-new').height()
|
||||
viewableContentHeight = @$('.main').height()
|
||||
return if viewableContentHeight > realContentHeight
|
||||
@main.scrollTop( @main.prop('scrollHeight') )
|
||||
|
||||
autosaveStop: =>
|
||||
|
|
Loading…
Reference in a new issue