Handle back button correctly in custom tabs

RESOLVED FIXED in Firefox 51

Status

()

defect
P2
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: droeh, Assigned: droeh)

Tracking

(Blocks 1 bug)

unspecified
Firefox 51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Currently, when in a custom tab, pressing the back button will close the active tab but leave the CustomTabsActivity running. Correct behavior is probably to call finish().
(Assignee)

Comment 1

3 years ago
Just a quick and simple patch for this that finishes the activity and does nothing else when the back button is pressed in a custom tab. There are probably other considerations here (eg: do we close the tab? do we allow the back button to be used for navigation?), but I think we should land this ASAP and figure those issues out later. Without this patch it is impossible to return to an app that has launched a custom tab.
Attachment #8787408 - Flags: review?(snorp)
Priority: -- → P2
Comment on attachment 8787408 [details] [diff] [review]
Back button support

Review of attachment 8787408 [details] [diff] [review]:
-----------------------------------------------------------------

Sounds good. Please file followups for the other questions you mentioned (or just one bug for 'figure out back button behavior')
Attachment #8787408 - Flags: review?(snorp) → review+

Comment 3

3 years ago
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bdf79acb0726
Override onBackPressed in CustomTabsActivity to finish the activity. r=snorp

Comment 4

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bdf79acb0726
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
You need to log in before you can comment on or make changes to this bug.