Closed Bug 1527666 Opened 1 year ago Closed 1 year ago

Pressing back button often treated as long press

Categories

(Firefox for Android :: General, defect, P1)

Firefox 67
All
Android
defect

Tracking

()

VERIFIED FIXED
Firefox 68
Tracking Status
firefox65 --- unaffected
firefox66 --- unaffected
firefox67 + verified
firefox68 --- verified

People

(Reporter: snorp, Assigned: vlad.baicu)

References

Details

(Keywords: regression, Whiteboard: [bcs:p1])

Attachments

(1 file)

Recently on Fennec Nightly I've had problems where simply tapping the device back button shows the history list as if I long pressed.

Which Android version? (Although I'm not aware of any recent changes surrounding that code)

Flags: needinfo?(snorp)

(In reply to Jan Henning [:JanH] from comment #1)

Which Android version? (Although I'm not aware of any recent changes surrounding that code)

9.0

Flags: needinfo?(snorp)

Maybe bug 1328538 could help here, too?

Dirty screen? I'm not seeing this on a Pixel 3.

(In reply to Kevin Brosnan [:kbrosnan] from comment #4)

Dirty screen? I'm not seeing this on a Pixel 3.

Pixel 3 here and I'm having this same issue

Duplicate of this bug: 1534918

[Tracking Requested - why for this release]:

Based on the info in bug 1534918, this might have been an unwanted side effect of bug 1518225.

Can we please get back button handling finally looked at by somebody who can also properly test this on a variety of devices?

As this issue sounds potentially rather annoying, as a temporary stopgap we could push back the target API change by one release and back out bug 1518225 from 67 for Beta and Release.

Flags: needinfo?(sarentz)
OS: Unspecified → Android
Hardware: Unspecified → All
Version: Firefox 64 → Firefox 67

Stefan, could you weigh in on Jan's proposal in comment #7 from a product and roadmap perspective please? Thanks

[...] who can also properly test this on a variety of devices

And at least with an emulator and a current local build, personally I unfortunately don't see anything strange.

I was able to reproduce this issue with Google Pixel (Android Q) on the latest Nightly build.

Discussed during triage today. We haven't received many reports of this being an issue, but some of us agreed it could potentially be annoying. As far as Android Q goes, we will continue to monitor the behavior on various devices as development continues.

After more discussion in triage we are going to keep this as P1 and look for an owner to investigate a workaround.
We could mitigate this by optimizing for the most popular android devices.
Chrome doesn't have the issue so we should be able to come up with something here.

Priority: P2 → P1
Whiteboard: [bcs?]

On versions >= N all long back presses we're handled manually in onKeyDown
and onKeyUp which could lead to certain complications. I have changed it
only for Android N where onKeyLongPress does not trigger as it should.

Keywords: checkin-needed
Assignee: nobody → vlad.baicu

Possible regression of bug 1304688

@Andrei, can you test the fix and see if you can reproduce on Android Q anymore ?

Flags: needinfo?(andrei.bodea)

I was not able to reproduce this issue anymore on Google Pixel XL with Android Q using a build(with a possible fix) provided by @Vlad.
Note that I tried to reproduce this issue using YouTube, News and many other websites(I tapped at least 100 times on the back button) but the BACK button worked accordingly.

Flags: needinfo?(andrei.bodea)

Does this back button bug affect GeckoView in Fenix? If so, would the Android N workaround need to be in GeckoView code or Fenix's app code?

It looks like this bug affects Fennec 67 Beta, so we'll want to uplift this fix to Beta.

Regressions: 1304688
Whiteboard: [bcs?] → [bcs:p1]

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da464aa8549f
Handle long back press manually only on Android N.r=petru

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

(In reply to Chris Peterson [:cpeterson] from comment #16)

Does this back button bug affect GeckoView in Fenix? If so, would the Android N workaround need to be in GeckoView code or Fenix's app code?

It looks like this bug affects Fennec 67 Beta, so we'll want to uplift this fix to Beta.

As far as I can tell no, the onKeyLongPress event in Android N(api 24-25) does not trigger which means that we need to manually detect the long press event onKeyDown and onKeyUp if the user tapped the back button. In this case, the issue was on the frontend side.

The next Fennec beta is beta 13 this Thursday, could you request an uplift today so as that we can have it uplifted by Monday on the beta branch? Thanks

Flags: needinfo?(vlad.baicu)

Comment on attachment 9059225 [details]
Bug 1527666 - Handle long back press manually only on Android N.r=petru

Beta/Release Uplift Approval Request

  • User impact if declined: Users will continue to occasionally trigger the history list by tapping the back button.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Follow Andrei Bodea's STRs from bug 1527666
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Minor change, we're only manually handling the long back press on Android N where the event provided by the OS does not trigger as it should.
  • String changes made/needed:
Flags: needinfo?(vlad.baicu)
Attachment #9059225 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Clearing old needinfo for Stefan now that the fix has landed.

Flags: needinfo?(sarentz)

Comment on attachment 9059225 [details]
Bug 1527666 - Handle long back press manually only on Android N.r=petru

Low-risk fix for a P1 Fennec regression, uplift approved for 67 beta 13, thanks.

Attachment #9059225 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I can confirm that this issue is fixed on the latest version of Nightly 68.0.1 (2019-04-20) using Samsung Galaxy S8 (Android 9) and Google Pixel (Android 9). I'll let the qa-triaged flag till it's verified on beta, thanks.

Hello,

I was not able to reproduce this issue anymore on Beta 67.0b13 using a Google Pixel XL with Android Q.

I went through a lot o popular website and used the back button many times and have not encountered the issue.

Due to my findings, I'll mark this issue as verified in Firefox 67.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.