From b134f82fab94aea3fb4c9fed06cccec595008cc2 Mon Sep 17 00:00:00 2001 From: Mathias Meyer Date: Tue, 27 May 2014 12:39:53 +0200 Subject: [PATCH] Scroll #L links to upper third of the screen. Fixes travis-ci/travis-ci#2276 --- assets/scripts/app/views/log.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scripts/app/views/log.coffee b/assets/scripts/app/views/log.coffee index 927fa88a..72557b37 100644 --- a/assets/scripts/app/views/log.coffee +++ b/assets/scripts/app/views/log.coffee @@ -93,7 +93,7 @@ Log.Scroll.prototype = $.extend new Log.Listener, tryScroll: -> if element = $("#log p:visible.highlight:first") $('#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.prototype = $.extend new Log.Listener,