From 43676b4f814a1a09886956e09d0362e15028de83 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sun, 27 May 2007 15:48:05 +0000 Subject: [PATCH] explicitly set JS version to 1.7 --- chrome/content/vimperator/vimperator.js | 4 +++- chrome/content/vimperator/vimperator.xul | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index 4f691b12..0044dff2 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -742,7 +742,9 @@ function Vimperator() // After pressing Escape, put focus on a non-input field of the browser document this.focusContent = function() { - var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].getService(Components.interfaces.nsIWindowWatcher); + var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]. + getService(Components.interfaces.nsIWindowWatcher); + if (window == ww.activeWindow && document.commandDispatcher.focusedElement) document.commandDispatcher.focusedElement.blur(); diff --git a/chrome/content/vimperator/vimperator.xul b/chrome/content/vimperator/vimperator.xul index 98b6c4b7..95223560 100644 --- a/chrome/content/vimperator/vimperator.xul +++ b/chrome/content/vimperator/vimperator.xul @@ -38,16 +38,16 @@ the terms of any one of the MPL, the GPL or the LGPL. xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> -