Bug 1043522 - Subsequent searches will quickly flash the previous search in the WebView. r=margaret
authorEric Edens <eedens@mozilla.com>
Fri, 01 Aug 2014 13:57:40 -0700
changeset 197743 02efb609a3f70791a525da7198ad8779160f6e5f
parent 197742 10f1f952ff736264ca8e91d12c1865cacab13e40
child 197744 9134e79e230dd1ec2f552f0ffdf17fe678c89a25
push id8042
push userrnewman@mozilla.com
push dateMon, 04 Aug 2014 23:38:34 +0000
treeherderfx-team@2c4ad23ccbc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1043522
milestone34.0a1
Bug 1043522 - Subsequent searches will quickly flash the previous search in the WebView. r=margaret
mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
--- a/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
+++ b/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
@@ -76,16 +76,17 @@ public class PostSearchFragment extends 
     public void startSearch(String query) {
         setUrl(Constants.YAHOO_WEB_SEARCH_BASE_URL + Uri.encode(query));
     }
 
     private void setUrl(String url) {
         // Only load URLs if they're different than what's already
         // loaded in the webview.
         if (!TextUtils.equals(webview.getUrl(), url)) {
+            webview.loadUrl("about:blank");
             webview.loadUrl(url);
         }
     }
 
     /**
      * A custom WebViewClient that intercepts every page load. This allows
      * us to decide whether to load the url here, or send it to Android
      * as an intent.