Bug 590524 - Searching for items is not working correctly [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 25 Aug 2010 17:44:18 +0200
changeset 66490 a65def5b42dad444a51cd1c16aa1d080b05dd2dd
parent 66489 7bf0a6c65238ff988b09d97ed9d9ff1a957392d7
child 66491 df42ce97ff6a78a12b6f3e0f573c7a52720f5f6b
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs590524
Bug 590524 - Searching for items is not working correctly [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -558,25 +558,28 @@ var BrowserUI = {
 
   doButtonSearch: function(button) {
     if (!("engine" in button) || !button.engine)
       return;
 
     // We don't want the button to look pressed for now
     button.parentNode.selectedItem = null;
 
+    // save the current value of the urlbar
+    let searchValue = this._edit.value;
+
     // Give the new page lots of room
     Browser.hideSidebars();
     this.activePanel = null;
     this.closeAutoComplete(false);
 
     // Make sure we're online before attempting to load
     Util.forceOnline();
 
-    let submission = button.engine.getSubmission(this._edit.value, null);
+    let submission = button.engine.getSubmission(searchValue, null);
     Browser.loadURI(submission.uri.spec, { postData: submission.postData });
   },
 
   updateStar: function() {
     if (PlacesUtils.getMostRecentBookmarkForURI(Browser.selectedBrowser.currentURI) != -1)
       this.starButton.setAttribute("starred", "true");
     else
       this.starButton.removeAttribute("starred");