From acd2f100c969ff68bd0902342858c17a960f0b0d Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 27 May 2013 20:26:37 +0200 Subject: [PATCH] Fix #1129. --- src/Miscellaneous/Keybinds.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index e731a8a5f..e264120d6 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -176,8 +176,11 @@ Keybinds = rect = postEl.getBoundingClientRect() if rect.bottom >= topMargin and rect.top <= doc.clientHeight # We're at least partially visible root = postEl.parentNode - next = $.x 'child::div[contains(@class,"post reply")]', - if delta is +1 then root.nextElementSibling else root.previousElementSibling + axe = if delta is +1 + 'following' + else + 'preceding' + next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root unless next @focus postEl return