diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 74e55ecc1..76370e38c 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -193,11 +193,11 @@ Keybinds = {height} = postEl.getBoundingClientRect() if Header.getTopOf(postEl) >= -height and Header.getBottomOf(postEl) >= -height # We're at least partially visible root = postEl.parentNode - axe = if delta is +1 + axis = if delta is +1 'following' else 'preceding' - return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root + return unless next = $.x "#{axis}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root Header.scrollToIfNeeded next, delta is +1 @focus next $.rmClass postEl, 'highlight' diff --git a/src/Miscellaneous/Nav.coffee b/src/Miscellaneous/Nav.coffee index 59c532ec1..659cce4e1 100644 --- a/src/Miscellaneous/Nav.coffee +++ b/src/Miscellaneous/Nav.coffee @@ -48,11 +48,11 @@ Nav = scroll: (delta) -> thread = Nav.getThread() - axe = if delta is +1 + axis = if delta is +1 'following' else 'preceding' - if next = $.x "#{axe}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread + if next = $.x "#{axis}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread # 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.