diff options
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 31f0eab5..cd7a7605 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -225,6 +225,10 @@ setScrollPosition = (scrollX, scrollY) -> # Called from the backend in order to change frame focus. # window.focusThisFrame = (shouldHighlight) -> + if window.innerWidth < 3 or window.innerHeight < 3 + # This frame is too small to focus. Cancel and tell the background frame to focus the next one instead. + chrome.runtime.sendMessage({ handler: "nextFrame", frameId: frameId }) + return window.focus() if (document.body && shouldHighlight) borderWas = document.body.style.border |
