From f2d1334ce701c949f2bade3c195290d25d8b0096 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Tue, 5 Feb 2008 02:51:58 +0000 Subject: [PATCH] added vimperator.config.mainWidget --- content/events.js | 2 +- content/muttator.js | 5 +++++ content/vim.js | 3 ++- content/vimperator.js | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/content/events.js b/content/events.js index a06cd11c..c14f7b31 100644 --- a/content/events.js +++ b/content/events.js @@ -392,7 +392,7 @@ vimperator.Events = function () //{{{ doc.pageIsFullyLoaded = 1; // code which is only relevant if the page load is the current tab goes here: - if (doc == getBrowser().selectedBrowser.contentDocument) + if (!vimperator.tabs || doc == getBrowser().selectedBrowser.contentDocument) { // we want to stay in command mode after a page has loaded // XXX: Does this still causes window map events which is _very_ annoying diff --git a/content/muttator.js b/content/muttator.js index 6bd489fb..f5421957 100644 --- a/content/muttator.js +++ b/content/muttator.js @@ -29,5 +29,10 @@ the terms of any one of the MPL, the GPL or the LGPL. vimperator.config = { name: "Muttator", hostApplication: "Thunderbird", + + // this widget is focused when focusContent() is called + get mainWidget() { return GetThreadTree(); }, dialogs: [] } + +// vim: set fdm=marker sw=4 ts=4 et: diff --git a/content/vim.js b/content/vim.js index f592fbc1..477d4b98 100644 --- a/content/vim.js +++ b/content/vim.js @@ -163,7 +163,8 @@ const vimperator = (function () //{{{ if (window == ww.activeWindow && document.commandDispatcher.focusedElement && clearFocusedElement) document.commandDispatcher.focusedElement.blur(); - content.focus(); + var elem = vimperator.config.mainWidget || content; + elem.focus(); }, // partial sixth level expression evaluation diff --git a/content/vimperator.js b/content/vimperator.js index 0f0959cc..25ad92ba 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -31,3 +31,5 @@ vimperator.config = { hostApplication: "Firefox", dialogs: [] } + +// vim: set fdm=marker sw=4 ts=4 et: