Scroll #L links to upper third of the screen.

Fixes travis-ci/travis-ci#2276
This commit is contained in:
Mathias Meyer 2014-05-27 12:39:53 +02:00
parent 7a044cda89
commit b134f82fab

View File

@ -93,7 +93,7 @@ Log.Scroll.prototype = $.extend new Log.Listener,
tryScroll: -> tryScroll: ->
if element = $("#log p:visible.highlight:first") if element = $("#log p:visible.highlight:first")
$('#main').scrollTop(0) $('#main').scrollTop(0)
$('html, body').scrollTop(element.offset()?.top) # weird, html works in chrome, body in firefox $('html, body').scrollTop(element.offset()?.top - (window.innerHeight / 3)) # weird, html works in chrome, body in firefox
# Log.Logger = -> # Log.Logger = ->
# Log.Logger.prototype = $.extend new Log.Listener, # Log.Logger.prototype = $.extend new Log.Listener,