summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/application.js.coffee12
2 files changed, 8 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d7d1eb7ab41..69c2c120d99 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased)
+ - Prevent anchors from being hidden by header (Stan Hu)
- Upgrade gitlab_git to 7.2.15 to fix `git blame` errors with ISO-encoded files (Stan Hu)
- Prevent too many redirects upon login when home page URL is set to external_url (Stan Hu)
- Improve dropdown positioning on the project home page (Hannes Rosenögger)
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee
index c263912b7ea..8e987ac4e83 100644
--- a/app/assets/javascripts/application.js.coffee
+++ b/app/assets/javascripts/application.js.coffee
@@ -94,16 +94,18 @@ window.unbindEvents = ->
$(document).off('scroll')
window.shiftWindow = ->
- scrollBy 0, -50
+ scrollBy 0, -100
document.addEventListener("page:fetch", unbindEvents)
-# Scroll the window to avoid the topnav bar
-# https://github.com/twitter/bootstrap/issues/1768
-if location.hash
- setTimeout shiftWindow, 1
window.addEventListener "hashchange", shiftWindow
+window.onload = ->
+ # Scroll the window to avoid the topnav bar
+ # https://github.com/twitter/bootstrap/issues/1768
+ if location.hash
+ setTimeout shiftWindow, 100
+
$ ->
$(".nicescroll").niceScroll(cursoropacitymax: '0.4', cursorcolor: '#FFF', cursorborder: "1px solid #FFF")