mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 16:32:27 +01:00
fix focus problem for Paul :)
This commit is contained in:
@@ -270,7 +270,8 @@ liberator.Events = function () //{{{
|
|||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.tabs.updateSelectionHistory();
|
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);
|
}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -943,13 +944,12 @@ liberator.Events = function () //{{{
|
|||||||
if (liberator.mode == liberator.modes.COMMAND_LINE)
|
if (liberator.mode == liberator.modes.COMMAND_LINE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// liberator.log("onFocusChange: " + liberator.buffer.loaded);
|
|
||||||
|
|
||||||
var win = window.document.commandDispatcher.focusedWindow;
|
var win = window.document.commandDispatcher.focusedWindow;
|
||||||
var elem = window.document.commandDispatcher.focusedElement;
|
var elem = window.document.commandDispatcher.focusedElement;
|
||||||
if (elem && elem.readOnly)
|
if (elem && elem.readOnly)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// liberator.log("onFocusChange: " + elem);
|
||||||
// dump("=+++++++++=\n" + liberator.util.objectToString(event.target) + "\n")
|
// dump("=+++++++++=\n" + liberator.util.objectToString(event.target) + "\n")
|
||||||
// dump (elem + ": " + win + "\n");//" - target: " + event.target + " - origtarget: " + event.originalTarget + " - expltarget: " + event.explicitOriginalTarget + "\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.buffer.loaded = 0;
|
||||||
liberator.statusline.updateProgress(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)
|
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -559,6 +559,7 @@ const liberator = (function () //{{{
|
|||||||
if (window == ww.activeWindow && document.commandDispatcher.focusedElement && clearFocusedElement)
|
if (window == ww.activeWindow && document.commandDispatcher.focusedElement && clearFocusedElement)
|
||||||
document.commandDispatcher.focusedElement.blur();
|
document.commandDispatcher.focusedElement.blur();
|
||||||
|
|
||||||
|
liberator.log("focusContent: " + clearFocusedElement);
|
||||||
// TODO: make more generic
|
// TODO: make more generic
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ liberator.modes = (function () //{{{
|
|||||||
function handleModeChange(oldMode, newMode)
|
function handleModeChange(oldMode, newMode)
|
||||||
{
|
{
|
||||||
// TODO: fix v.log() to work with verbosity level
|
// 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");
|
// dump("switching from mode " + oldMode + " to mode " + newMode + "\n");
|
||||||
|
|
||||||
switch (oldMode)
|
switch (oldMode)
|
||||||
@@ -248,7 +248,6 @@ liberator.modes = (function () //{{{
|
|||||||
// keeps recording state
|
// keeps recording state
|
||||||
reset: function (silent)
|
reset: function (silent)
|
||||||
{
|
{
|
||||||
//if (window.wintype == "msgcompose")
|
|
||||||
if (liberator.config.isComposeWindow)
|
if (liberator.config.isComposeWindow)
|
||||||
this.set(liberator.modes.COMPOSE, liberator.modes.NONE, silent);
|
this.set(liberator.modes.COMPOSE, liberator.modes.NONE, silent);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user