From c0da334fcefde1448090a767e5d997ec8652d2c6 Mon Sep 17 00:00:00 2001 From: "ben%netscape.com" Date: Thu, 27 Jul 2006 14:48:55 +0000 Subject: [PATCH] fix for 28103, landing on trunk first... r=danm --- suite/common/search/search-panel.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/suite/common/search/search-panel.js b/suite/common/search/search-panel.js index 882cd0a64fea..ad16d4be2ea9 100644 --- a/suite/common/search/search-panel.js +++ b/suite/common/search/search-panel.js @@ -27,7 +27,6 @@ var settingsButton = null; var settingsButtonText = null; var bunremoveAttributedle = null; var pref = null; -var mClickCount = null; // get the click count pref try { @@ -405,7 +404,7 @@ function doSearch() try { if( pref ) { var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); - mClickCount = prefvalue ? 2 : 1; + var mClickCount = prefvalue ? 2 : 1; } else mClickCount = 1; @@ -575,8 +574,7 @@ function FOO_doSearch() function openURL(event, treeitem, root) { - /* mClickCount variable now made global and retrieved at start of doSearch() */ - /* try { + try { if( pref ) { var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; @@ -586,9 +584,9 @@ function openURL(event, treeitem, root) } catch(e) { mClickCount = 1; - } */ + } - if ((event.button != 1) || (event.clickCount != mClickCount)) + if ((event.button != 1) || (event.clickCount != mClickCount)) return(false); if (treeitem.getAttribute("container") == "true")