diff options
| author | Stephen Blott | 2014-12-16 15:44:06 +0000 |
|---|---|---|
| committer | Stephen Blott | 2014-12-16 15:44:06 +0000 |
| commit | db4b0c952fdf8fff517a4393cd07b04ecffb2ead (patch) | |
| tree | e408b558a889d8bc758ad2530d0fe35a9ec23184 /content_scripts | |
| parent | 0b3a242841f7badb069840dec80a24d38d4e843a (diff) | |
| parent | a36a735fca856bb59dd62b6bc77c56431cc9b9fd (diff) | |
| download | vimium-db4b0c952fdf8fff517a4393cd07b04ecffb2ead.tar.bz2 | |
Merge branch 'master' into post-1.46
Conflicts:
background_scripts/main.coffee
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 96a7e461..eaf66b72 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -244,6 +244,12 @@ 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. + # NOTE(smblott) We assume that there is at least one frame large enough to focus. + # See #1317. + chrome.runtime.sendMessage({ handler: "nextFrame", frameId: frameId }) + return window.focus() if (document.body && shouldHighlight) borderWas = document.body.style.border |
