mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:37:59 +01:00
fix focus problem for Paul :)
This commit is contained in:
@@ -270,6 +270,7 @@ liberator.Events = function () //{{{
|
||||
liberator.statusline.updateTabCount();
|
||||
liberator.tabs.updateSelectionHistory();
|
||||
|
||||
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,9 +1405,15 @@ liberator.Events = function () //{{{
|
||||
{
|
||||
liberator.buffer.loaded = 0;
|
||||
liberator.statusline.updateProgress(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)
|
||||
{
|
||||
liberator.buffer.loaded = (status == 0 ? 1 : 2);
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user