Fix #411.
I always forget that Firefox is shit and doesn't let you select nodes in a logical order.
This commit is contained in:
parent
2af993300c
commit
8e651ff102
@ -1287,7 +1287,7 @@
|
||||
post.removeAttribute('tabindex');
|
||||
rect = post.getBoundingClientRect();
|
||||
if (rect.bottom >= 0 && rect.top <= d.documentElement.clientHeight) {
|
||||
next = delta === +1 ? $.x('parent::div/following-sibling::div/div[contains(@class,"reply")]', post) : $.x('parent::div/preceding-sibling::div/div[contains(@class,"reply")]', post);
|
||||
next = $.x('child::div[contains(@class,"post reply")]', delta === +1 ? post.parentNode.nextElementSibling : post.parentNode.previousElementSibling);
|
||||
if (!next) {
|
||||
this.focus(post);
|
||||
return;
|
||||
|
||||
@ -968,11 +968,8 @@ Keybinds =
|
||||
post.removeAttribute 'tabindex'
|
||||
rect = post.getBoundingClientRect()
|
||||
if rect.bottom >= 0 and rect.top <= d.documentElement.clientHeight # We're at least partially visible
|
||||
next =
|
||||
if delta is +1
|
||||
$.x 'parent::div/following-sibling::div/div[contains(@class,"reply")]', post
|
||||
else
|
||||
$.x 'parent::div/preceding-sibling::div/div[contains(@class,"reply")]', post
|
||||
next = $.x 'child::div[contains(@class,"post reply")]',
|
||||
if delta is +1 then post.parentNode.nextElementSibling else post.parentNode.previousElementSibling
|
||||
unless next
|
||||
@focus post
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user