Closed
Bug 699052
Opened 13 years ago
Closed 13 years ago
Android back button should close the selected tab and return to the previous tab when possible
Categories
(Firefox for Android Graveyard :: General, defect, P2)
Tracking
(firefox11 fixed, firefox13 verified, fennec11+)
VERIFIED
FIXED
People
(Reporter: lmandel, Assigned: mbrubeck)
References
Details
Attachments
(1 file, 2 obsolete files)
18.59 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
In the Android native UI, when I select menu->More->Add-ons, about:addons opens in a new tab in my browser. I then click the back button (physical button on my phone) to return to the page that I was viewing (this is the typical flow from preferences in other Android apps) and the browser exits leaving me back at my home screen. To reproduce: 1. Open any Web page, such as mozilla.org. 2. Select menu button->More->Add-ons. 3. Click the back button. Expected: I am returned to the mozilla.org tab. Actual: Firefox exits.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mbrubeck
Reporter | ||
Updated•13 years ago
|
Summary: Clicking back button from add-ons pref page exists browser → Clicking back button from add-ons pref page exits browser
Updated•13 years ago
|
Priority: -- → P2
Assignee | ||
Updated•13 years ago
|
Summary: Clicking back button from add-ons pref page exits browser → Android back button should close the selected tab and return to the previous tab when possible
Assignee | ||
Comment 2•13 years ago
|
||
This is pretty much complete except I haven't really tested it yet.
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #581433 -
Attachment is obsolete: true
Assignee | ||
Comment 4•13 years ago
|
||
This is not perfect, but I think it's good enough for a first pass. This implements basically the same behavior as XUL Fennec (which in turn is based partly on both Android's stock browser). If you press the system Back button and there is no previous history item in the current tab, then: * If the tab was opened from another activity, Fennec closes the tab and minimizes itself (so you return to the previous activity). * If the tab was opened from another tab (e.g. by selecting "Open link in new tab" from the context menu), Fennec closes the tab and returns to the "parent tab" if that tab is still open. * If the tab was opened within Fennec but has no parent tab, or if the parent tab was closed, then Fennec minimizes itself (and returns to the previous activity). In-content UI like about:firefox and about:addons is always treated as a "child" of the previous tab, so that users can easily dismiss it with the Back button whether or not they noticed that it opened in a new tab.
Attachment #581479 -
Attachment is obsolete: true
Attachment #582362 -
Flags: review?(mark.finkle)
Comment 5•13 years ago
|
||
Comment on attachment 582362 [details] [diff] [review] patch >Bug 710302 - Don't treat an address with a ":" as a search unless it has a space first [r=mfinkle, a=javascript] Wrong comment >diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java > case R.id.addons: >- GeckoAppShell.sendEventToGecko(new GeckoEvent("about:addons")); >+ loadUrlInChildTab("about:addons"); The "Child" part of loadUrlInChildTab is not sitting well with me for some unknown reason. Is loadUrlInNewTab ok with you? >diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js > nsBrowserAccess.prototype = { > openURI: function browser_openURI(aURI, aOpener, aWhere, aContext) { This method is due for some changes from Kats' patch, but the bitrot won't be too bad for either him or you. > gecko: { > type: "Tab:Added", > tabID: this.id, > uri: aURL, >+ parentId: ("parentId" in aParams) ? aParams.parentId : -1, >+ external: ("external" in aParams) ? aParams.external : false, > selected: ("selected" in aParams) ? aParams.selected : true > } > }; >+ dump(JSON.stringify(message)); Remove the dump >diff --git a/mobile/android/components/BrowserCLH.js b/mobile/android/components/BrowserCLH.js > if (browserWin) { >+ dump("openURI with OPEN_EXTERNAL"); Remove the dump There is some good refactor in this patch too. Let's see what shakes loose so we can get this behavior nailed down.
Attachment #582362 -
Flags: review?(mark.finkle) → review+
Comment 6•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e588135f62ab
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
tracking-fennec: --- → 11+
Comment 7•13 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/e588135f62ab
status-firefox11:
--- → fixed
Comment 8•12 years ago
|
||
Verified fixed on: Nightly Fennec 13.0a1 (2012-03-08) Device: HTC Desire Z OS: Android 2.3.3
Status: RESOLVED → VERIFIED
Updated•12 years ago
|
status-firefox13:
--- → verified
Updated•3 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
•