1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 19:07:58 +01:00

many small fixes to the hints, and some minor mode handling changes

This commit is contained in:
Martin Stubenschrott
2007-10-25 19:57:49 +00:00
parent ecd70b31e8
commit faefb78c24
6 changed files with 200 additions and 141 deletions

View File

@@ -148,15 +148,16 @@ const vimperator = (function() //{{{
},
// after pressing Escape, put focus on a non-input field of the browser document
focusContent: function()
// if clearFocusedElement, also blur a focused link
focusContent: function(clearFocusedElement)
{
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].
getService(Components.interfaces.nsIWindowWatcher);
if (window == ww.activeWindow && document.commandDispatcher.focusedElement)
if (window == ww.activeWindow && document.commandDispatcher.focusedElement && clearFocusedElement)
document.commandDispatcher.focusedElement.blur();
content.focus(); // FIXME: shouldn't be window.document.content?
content.focus();
},
// partial sixth level expression evaluation