Closed Bug 1300574 Opened 5 years ago Closed 5 years ago

Back button doesn't navigate back a page in custom tabs


(Firefox for Android Graveyard :: General, defect)

51 Branch
Not set


(firefox51 fixed)

Firefox 51
Tracking Status
firefox51 --- fixed


(Reporter: jonalmeida, Assigned: droeh)




(1 file)

- Use a sample app[1] to open a tab and link a link that navigates to the next page.
- Click the back button.

Actual results:
- Pressing the back button closes the tab and goes back to the app.

Expected results:
- Pressing the back button should navigate to the previous page in that custom tab. If there are no more pages to navigate back to, then go back to the app.

This is the Chrome implementation for custom tabs as well and seems the like the appropriate interaction one would expect.

[1]: For my steps, I've used a Hacker News app that supports Custom Tabs:
We just landed the patch to go back to the app (bug 1299925) :)
(In reply to Sebastian Kaspari (:sebastian) from comment #1)
> We just landed the patch to go back to the app (bug 1299925) :)

Yep, that's the current functionality which ignores the link history of the tab, so pressing the back button at any point will close the custom tab. droeh mentioned in that bug that the fix was to get the back button working and not have you stuck in the browser forever when you open a tab. :)
A quick patch for this; gives Gecko a chance to handle the button press first, then tries to go back on the active tab and only finish()es if that is not possible.
Attachment #8791989 - Flags: review?(snorp)
Assignee: nobody → droeh
Attachment #8791989 - Flags: review?(snorp) → review+
Blocks: 1303362
Pushed by
Use the back button for navigation in custom tabs when possible. r=snorp
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Verified as fixed on 57.0b9 and 58.0a1.
Devices: Motorola Nexus 6 (Android 7.1.1) and Sony Xperia Z5 Premium (Android 6.0.1).
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.