From 63b66497e9c11e3db7d2ba254594519b32728bab Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 11 Feb 2008 18:00:56 +0000 Subject: [PATCH] fixed focus stuff for muttator again, we just can't avoid it that we end up in -- MESSAGE -- mode when we click a link. Press to get back to normal mode. --- content/events.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/content/events.js b/content/events.js index e769d568..731ea644 100644 --- a/content/events.js +++ b/content/events.js @@ -780,24 +780,16 @@ vimperator.Events = function () //{{{ return; } - if (vimperator.config.name == "Muttator")// && - //win && win.document && win.document instanceof HTMLDocument) + if (vimperator.config.name == "Muttator") { - // we switch to -- MESSAGE -- mode for muttator, when an HTML document - // is selected but not when we just click a link - if (win && win.document && win.document instanceof HTMLDocument && (!elem || vimperator.mode == vimperator.modes.MESSAGE)) + // we switch to -- MESSAGE -- mode for muttator, when an HTML document gets focus + if ((win && win.document && win.document instanceof HTMLDocument) || + elem instanceof HTMLAnchorElement) { if (vimperator.mode != vimperator.modes.MESSAGE) vimperator.mode = vimperator.modes.MESSAGE; return; } - if (elem instanceof HTMLAnchorElement && vimperator.mode != vimperator.modes.MESSAGE) - { - vimperator.focusContent(); - return; - } - else - ;//dump("hu\n") } if (vimperator.mode == vimperator.modes.INSERT ||