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');
|
post.removeAttribute('tabindex');
|
||||||
rect = post.getBoundingClientRect();
|
rect = post.getBoundingClientRect();
|
||||||
if (rect.bottom >= 0 && rect.top <= d.documentElement.clientHeight) {
|
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) {
|
if (!next) {
|
||||||
this.focus(post);
|
this.focus(post);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -968,11 +968,8 @@ Keybinds =
|
|||||||
post.removeAttribute 'tabindex'
|
post.removeAttribute 'tabindex'
|
||||||
rect = post.getBoundingClientRect()
|
rect = post.getBoundingClientRect()
|
||||||
if rect.bottom >= 0 and rect.top <= d.documentElement.clientHeight # We're at least partially visible
|
if rect.bottom >= 0 and rect.top <= d.documentElement.clientHeight # We're at least partially visible
|
||||||
next =
|
next = $.x 'child::div[contains(@class,"post reply")]',
|
||||||
if delta is +1
|
if delta is +1 then post.parentNode.nextElementSibling else post.parentNode.previousElementSibling
|
||||||
$.x 'parent::div/following-sibling::div/div[contains(@class,"reply")]', post
|
|
||||||
else
|
|
||||||
$.x 'parent::div/preceding-sibling::div/div[contains(@class,"reply")]', post
|
|
||||||
unless next
|
unless next
|
||||||
@focus post
|
@focus post
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user