Fenix: [Bug] Tab history opens twice on long back button press

Created on 24 Jul 2020  ·  9Comments  ·  Source: mozilla-mobile/fenix

https://github.com/mozilla-mobile/fenix/issues/1048#issuecomment-663198580

Steps to reproduce

Long press on back button
(Maybe it's important, my phone have physical back button)

Expected behavior

Tab history opens once

Actual behavior

Tab history opens twice

Device information

  • Android device: Samsung S6 Edge / Android 7.0
  • Fenix version: Nightly 200723 18:05
Gesture History S2 🐞 bug

All 9 comments

Thanks for the note that you have a physical back button! It might be useful! 😄

Thanks for the note that you have a physical back button! It might be useful! 😄

Yeah 😊
I did some "research" and can provide additional info

  1. When I press physical button - history opens twice

  2. I did build.prop tweak to enable soft keys (qemu.hw.mainkeys=0)
    When I press software button - history opens once

  3. When I long tap on forward button in Fenix menu - history opens once

This is a very weird bug and probably manufacturer/device specific. Normally we use onKeyLongPress to trigger the tab history, but on Android 7 that method doesn't actually work. Instead we do our own handling of back button presses to achieve the same thing [1]. My first instinct was to assume onKeyLongPress and our custom long press implementation were both being called but we explicitly don't use onKeyLongPress on Android 7. The solution is probably to just check if the tab history dialog is open before navigating to it. Could QA check on some other devices (preferably Android 7) so we have a better idea of how many devices this affects?

Thank you for all the details by the way!

[1] https://github.com/mozilla-mobile/fenix/blob/5ddf8beea7432826e20ca4e46e8bba29338f0ef2/app/src/main/java/org/mozilla/fenix/HomeActivity.kt#L381

Hi! I had tested this on Nightly 200804 Build #22170943 GV 81.0a1 from 8/4 with the following devices:

  • Samsung Galaxy S7 (Android 7) - the recent history pop-up is displayed twice when tapping the device back button;
    20200804-174418
  • Huawei P9 Lite (Android 7), Nexus 9 (Android 7.1.1), Huawei MediaPad M3 Lite 10 (Android 7.0) - the recent history pop-up opens once when tapping the device back button. None of these devices has a physical device back button.

I will remove the qa:needed label for now.

Hi, @Augures01, @eliserichards, @person808 please note that the only physical button from s6, s7 devices is the home button the other two buttons back and recent apps are capacitive buttons.

Hi, @Augures01, @eliserichards, @person808 please note that the only physical button from s6, s7 devices is the home button the other two buttons back and recent apps are capacitive buttons.

Ok, I will remember this. But when I say "physical button", I mean "button than not on-screen displayed"

Yes, totally agree and I understand why you called them physical I added this information for the developers maybe it helps when trying to fix the issue.

@Augures01 We are adding a back button to the menu as well (should be in the next nightly). You can long press it to see tab history and it shouldn't open twice.

@Augures01 We are adding a back button to the menu as well (should be in the next nightly). You can long press it to see tab history and it shouldn't open twice.

I'm not an active user of this feature
I just accidentally pressed back button, found this strange behaviour and reported it 😅
Any fixes not for me, but for other users

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreicristianpetcu picture andreicristianpetcu  ·  3Comments

Chris01277 picture Chris01277  ·  3Comments

clitetailor picture clitetailor  ·  3Comments

andreicristianpetcu picture andreicristianpetcu  ·  3Comments

phileastv picture phileastv  ·  3Comments