Fix #1146.
This commit is contained in:
parent
badc11d4c0
commit
573bd6f294
@ -75,10 +75,10 @@ Keybinds =
|
||||
window.location = form.action
|
||||
# Thread Navigation
|
||||
when Conf['Next thread']
|
||||
return if g.VIEW is 'thread'
|
||||
return if g.VIEW isnt 'index'
|
||||
Nav.scroll +1
|
||||
when Conf['Previous thread']
|
||||
return if g.VIEW is 'thread'
|
||||
return if g.VIEW isnt 'index'
|
||||
Nav.scroll -1
|
||||
when Conf['Expand thread']
|
||||
ExpandThread.toggle thread
|
||||
|
||||
@ -60,8 +60,7 @@ Nav =
|
||||
# unless we're not at the beginning of the current thread
|
||||
# (and thus wanting to move to beginning)
|
||||
# or we're above the first thread and don't want to skip it
|
||||
unless (delta is -1 and Math.ceil(top) < 0) or (delta is +1 and top > 1)
|
||||
i += delta
|
||||
if (delta is -1 and top > -5) or (delta is +1 and top < 5)
|
||||
top = threads[i + delta]?.getBoundingClientRect().top - topMargin
|
||||
|
||||
top = threads[i]?.getBoundingClientRect().top - topMargin
|
||||
window.scrollBy 0, top
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user