From 20d9b63938905f2832e64dec7e2c1a578e382a12 Mon Sep 17 00:00:00 2001 From: "bugzilla%arlen.demon.co.uk" Date: Mon, 3 Jan 2005 00:52:33 +0000 Subject: [PATCH] Bug 271022 JavaScript Console Error: Opening Non-Sidebar Windows in the Sidebar ("searchBox has no properties") p=gavin.sharp@gmail.com r=mconnor --- browser/base/content/browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 58f6def8f64..30ae330ce52 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -3491,7 +3491,8 @@ function asyncFocusSearchBox(event) { var sidebar = document.getElementById("sidebar"); var searchBox = sidebar.contentDocument.getElementById("search-box"); - searchBox.focus(); + if (searchBox) + searchBox.focus(); sidebar.removeEventListener("load", asyncFocusSearchBox, true); }