Commit 47f0a8db authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-scroll-issue' into 'master'

Fix scroll issue

Fixes #1886

See merge request !1396
parents 2c053c93 8bc65f6d
...@@ -109,9 +109,19 @@ window.unbindEvents = -> ...@@ -109,9 +109,19 @@ window.unbindEvents = ->
$(document).unbind('scroll') $(document).unbind('scroll')
$(document).off('scroll') $(document).off('scroll')
window.shiftWindow = ->
scrollBy 0, -50
document.addEventListener("page:fetch", unbindEvents) 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
$ -> $ ->
# Click a .one_click_select field, select the contents # Click a .one_click_select field, select the contents
$(".one_click_select").on 'click', -> $(@).select() $(".one_click_select").on 'click', -> $(@).select()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment