From c6b3f0b9b6e11a057430ed46343dd9838c55af31 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sat, 24 Aug 2013 22:23:07 -0700 Subject: [PATCH] Focus a focusable element instead of trying to focus the image --- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/Images/Gallery.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 132d12288..9441d0a52 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -6688,7 +6688,7 @@ nodes.count.textContent = +this.dataset.id + 1; nodes.current = img; nodes.frame.scrollTop = 0; - nodes.current.focus(); + nodes.next.focus(); rect = this.getBoundingClientRect(); top = rect.top; if (top > 0) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 74f38b3f0..0a40149cc 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -6673,7 +6673,7 @@ nodes.count.textContent = +this.dataset.id + 1; nodes.current = img; nodes.frame.scrollTop = 0; - nodes.current.focus(); + nodes.next.focus(); rect = this.getBoundingClientRect(); top = rect.top; if (top > 0) { diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 197f0a4b8..113cd8d97 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -155,7 +155,7 @@ Gallery = nodes.count.textContent = +@dataset.id + 1 nodes.current = img nodes.frame.scrollTop = 0 - nodes.current.focus() + nodes.next.focus() # Scroll rect = @getBoundingClientRect()