diff options
| author | Ilya Sukhar | 2010-09-24 00:37:21 -0700 |
|---|---|---|
| committer | Ilya Sukhar | 2010-09-24 00:37:21 -0700 |
| commit | 11b879f6d49f6f5c08cd3276ab871d1ccffb179d (patch) | |
| tree | ae7d768b9f56a21140a42afab852be64e5e5b178 /background_page.html | |
| parent | 0370d60be82aead007f6b0804dd5b90e6fdb1b1c (diff) | |
| download | vimium-11b879f6d49f6f5c08cd3276ab871d1ccffb179d.tar.bz2 | |
Fix some frame logic and disable focusing the largest one for now because it's buggy with iframes.
Diffstat (limited to 'background_page.html')
| -rw-r--r-- | background_page.html | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/background_page.html b/background_page.html index b862a881..48084f77 100644 --- a/background_page.html +++ b/background_page.html @@ -604,15 +604,20 @@ } function registerFrame(request, sender) { - if (request.top) - framesForTab[sender.tab.id] = { total: request.total, frames: [] }; - else { - framesForTab[sender.tab.id].frames.push({ id: request.frameId, area: request.area }); + if (!framesForTab[sender.tab.id]) + framesForTab[sender.tab.id] = { frames: [] }; - // We've seen all the frames. Time to focus the largest one. - if (framesForTab[sender.tab.id].frames.length == framesForTab[sender.tab.id].total) - focusLargestFrame(sender.tab.id); + if (request.top) { + focusedFrame = request.frameId; + framesForTab[sender.tab.id].total = request.total; } + + framesForTab[sender.tab.id].frames.push({ id: request.frameId, area: request.area }); + + // We've seen all the frames. Time to focus the largest one. + // NOTE: Disabled because it's buggy with iframes. + // if (framesForTab[sender.tab.id].frames.length >= framesForTab[sender.tab.id].total) + // focusLargestFrame(sender.tab.id); } function focusLargestFrame(tabId) { |
