[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbutton/master] Bug #4660: Clear search and find boxes on New Identity.



commit 98b533c046e9bf5cafc91bfcf996c4ca7497bb26
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Tue May 1 16:47:28 2012 -0700

    Bug #4660: Clear search and find boxes on New Identity.
---
 src/chrome/content/torbutton.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index dc0b05b..876b6ef 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1432,6 +1432,16 @@ function torbutton_do_new_identity() {
 
   torbutton_close_on_toggle(true, true);
 
+  var searchBar = window.document.getElementById("searchbar");
+  if (searchBar)
+      searchBar.textbox.reset();
+
+  if (gFindBarInitialized) {
+      var findbox = gFindBar.getElement("findbar-textbox");
+      findbox.reset();
+      gFindBar.close();
+  }
+
   if(m_tb_prefs.getBoolPref('extensions.torbutton.clear_http_auth')) {
       var auth = Components.classes["@mozilla.org/network/http-auth-manager;1"].
           getService(Components.interfaces.nsIHttpAuthManager);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits