diff --git a/xpfe/components/search/resources/search-panel.js b/xpfe/components/search/resources/search-panel.js index 882cd0a64fe..ad16d4be2ea 100644 --- a/xpfe/components/search/resources/search-panel.js +++ b/xpfe/components/search/resources/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")