Closed Bug 1300574 Opened 3 years ago Closed 3 years ago

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

Categories

(Firefox for Android :: General, defect)

51 Branch
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 51
Tracking Status
firefox51 --- fixed

People

(Reporter: jonalmeida, Assigned: droeh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

STR:
- 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: https://play.google.com/store/apps/details?id=com.leavjenn.hews
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 droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eed652d8223d
Use the back button for navigation in custom tabs when possible. r=snorp
https://hg.mozilla.org/mozilla-central/rev/eed652d8223d
Status: NEW → RESOLVED
Closed: 3 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).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.