diff --git a/content/events.js b/content/events.js index 1d8d038e..a21d240a 100644 --- a/content/events.js +++ b/content/events.js @@ -270,7 +270,8 @@ liberator.Events = function () //{{{ liberator.statusline.updateTabCount(); liberator.tabs.updateSelectionHistory(); - setTimeout(function () { liberator.focusContent(true); }, 10); // just make sure, that no widget has focus + if (liberator.options["focuscontent"]) + setTimeout(function () { liberator.focusContent(true); }, 10); // just make sure, that no widget has focus }, false); } @@ -943,13 +944,12 @@ liberator.Events = function () //{{{ if (liberator.mode == liberator.modes.COMMAND_LINE) return; - // liberator.log("onFocusChange: " + liberator.buffer.loaded); - var win = window.document.commandDispatcher.focusedWindow; var elem = window.document.commandDispatcher.focusedElement; if (elem && elem.readOnly) return; + // liberator.log("onFocusChange: " + elem); // dump("=+++++++++=\n" + liberator.util.objectToString(event.target) + "\n") // dump (elem + ": " + win + "\n");//" - target: " + event.target + " - origtarget: " + event.originalTarget + " - expltarget: " + event.explicitOriginalTarget + "\n"); @@ -1405,8 +1405,14 @@ liberator.Events = function () //{{{ { liberator.buffer.loaded = 0; liberator.statusline.updateProgress(0); - setTimeout (function () { liberator.modes.reset(false); }, - liberator.mode == liberator.modes.HINTS ? 500 : 0); + + // don't reset mode if a frame of the frameset gets reloaded which + // is not the focused frame + if (document.commandDispatcher.focusedWindow == webProgress.DOMWindow) + { + setTimeout (function () { liberator.modes.reset(false); }, + liberator.mode == liberator.modes.HINTS ? 500 : 0); + } } else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP) { diff --git a/content/liberator.js b/content/liberator.js index f241198c..2376b97e 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -559,6 +559,7 @@ const liberator = (function () //{{{ if (window == ww.activeWindow && document.commandDispatcher.focusedElement && clearFocusedElement) document.commandDispatcher.focusedElement.blur(); + liberator.log("focusContent: " + clearFocusedElement); // TODO: make more generic try { diff --git a/content/modes.js b/content/modes.js index 5c6fcb06..cfd6e134 100644 --- a/content/modes.js +++ b/content/modes.js @@ -98,7 +98,7 @@ liberator.modes = (function () //{{{ function handleModeChange(oldMode, newMode) { // TODO: fix v.log() to work with verbosity level - // liberator.log("switching from mode " + oldMode + " to mode " + newMode, 7); + liberator.log("switching from mode " + oldMode + " to mode " + newMode, 7); // dump("switching from mode " + oldMode + " to mode " + newMode + "\n"); switch (oldMode) @@ -248,7 +248,6 @@ liberator.modes = (function () //{{{ // keeps recording state reset: function (silent) { - //if (window.wintype == "msgcompose") if (liberator.config.isComposeWindow) this.set(liberator.modes.COMPOSE, liberator.modes.NONE, silent); else