Closed
Bug 1049650
Opened 11 years ago
Closed 11 years ago
Searching for something in search activity it will open a new about:blank page in stead of search results
Categories
(Firefox for Android Graveyard :: Search Activity, defect)
Tracking
(firefox34 verified, fennec+)
VERIFIED
FIXED
Firefox 34
People
(Reporter: cos_flaviu, Assigned: eedens)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
|
3.84 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
Environment:
Device: Asus Transformer Tab (Android 4.2.1);
Build: Nightly 34.0a1 (2014-08-06);
Steps to reproduce:
1. Launch Nightly Search;
2. Search for something;
Expected result:
A new tab is opened in Firefox containing the search results.
Actual result:
A new about:blank page is opened in Firefox.
| Reporter | ||
Updated•11 years ago
|
Blocks: fennec-search-activity
Comment 1•11 years ago
|
||
This sounds like it was caused by bug 1043522.
I assume our "is this still a search result page?" check is saying "nope" and launching an intent.
| Assignee | ||
Comment 2•11 years ago
|
||
I was able to repro this on an HTC Glacier 2.3.7; patch coming shortly. :)
| Assignee | ||
Comment 3•11 years ago
|
||
Fix confirmed on HTC Glacier 2.3.7
PR: https://github.com/ericedens/FirefoxSearch/pull/50
Attachment #8468562 -
Flags: review?(margaret.leibovic)
Comment 4•11 years ago
|
||
Comment on attachment 8468562 [details] [diff] [review]
bug-1049650-fix.patch
Review of attachment 8468562 [details] [diff] [review]:
-----------------------------------------------------------------
This is a good approach, but I want us to change things around a bit to make this logic more intuitive.
::: mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
@@ +70,5 @@
> * @param url to test.
> * @return true if <code>url</code> is a page of search results.
> */
> protected boolean isSearchResultsPage(String url) {
> + return TextUtils.equals(ABOUT_BLANK, url) || url.contains(Constants.YAHOO_WEB_SEARCH_RESULTS_FILTER);
I think we should flip around the logic here to make this method return true if we want to launch an intent with this URL, since adding this about:blank check doesn't align with the semantics of this method name.
So we could rename it to something like `isExternalURL` or `shouldOpenInBrowser`, and then change around the logic where it's used.
We can also make this method private.
Attachment #8468562 -
Flags: review?(margaret.leibovic) → feedback+
Updated•11 years ago
|
tracking-fennec: --- → ?
| Assignee | ||
Comment 5•11 years ago
|
||
> This is a good approach, but I want us to change things around a bit to make
> this logic more intuitive.
Good call :)
Tested again with two gingerbread phones and a 4.4 phone.
Attachment #8468592 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Updated•11 years ago
|
Attachment #8468562 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•11 years ago
|
||
Also, removed the noop call to
super.onPageStarted(view, url, favicon);
Comment 7•11 years ago
|
||
Comment on attachment 8468592 [details] [diff] [review]
bug-1049650-fix.v2.patch
Review of attachment 8468592 [details] [diff] [review]:
-----------------------------------------------------------------
Nice. I'll land this for you on fx-team.
::: mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
@@ +96,5 @@
>
> @Override
> public void onPageStarted(WebView view, String url, Bitmap favicon) {
> + if (shouldSendToBrowser(url)) {
> + view.stopLoading();
Good call to stop the WebView. Does this mean that without this patch we're still loading the page in the WebView while we load it in Fennec?
Attachment #8468592 -
Flags: review?(margaret.leibovic) → review+
| Assignee | ||
Comment 8•11 years ago
|
||
> Good call to stop the WebView. Does this mean that without this patch we're
> still loading the page in the WebView while we load it in Fennec?
It was just a rearrangement -- `view.stopLoading()` used to be below the call to telemetry; I just moved it above so that we'd stop the loading as quickly as possible.
Comment 9•11 years ago
|
||
(In reply to Eric Edens [:eedens] from comment #8)
> > Good call to stop the WebView. Does this mean that without this patch we're
> > still loading the page in the WebView while we load it in Fennec?
>
> It was just a rearrangement -- `view.stopLoading()` used to be below the
> call to telemetry; I just moved it above so that we'd stop the loading as
> quickly as possible.
Oh, sorry, didn't notice that :)
https://hg.mozilla.org/integration/fx-team/rev/1082f601f769
| Assignee | ||
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Updated•11 years ago
|
tracking-fennec: ? → +
| Reporter | ||
Comment 12•11 years ago
|
||
Verified as fixed in build 34.0a1 (2014-08-07);
Device: Samsung Galaxy Nexus (Android 4.2.1).
Status: RESOLVED → VERIFIED
status-firefox34:
--- → verified
Updated•7 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•