Closed Bug 1917496 Opened 1 year ago Closed 1 year ago

Dismissing the AwesomeBar causes a navigation change

Categories

(Firefox for Android :: Toolbar, defect)

Firefox 132
All
Android
defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: jonalmeida, Assigned: jonalmeida)

References

Details

Attachments

(1 file)

Steps to reproduce

  1. Go to page 1.
  2. Navigate to page 2.
  3. Click on the AwesomeBar.
  4. Dismiss the keyboard.
  5. Dismiss the AwesomeBar.

Expected behaviour

  • The AwesomeBar is dismissed.
  • The browser session is still on page 2.

Actual behaviour

  • The AwesomeBar is dismissed.
  • The browser session has navigated to page 1.

Device information

  • Firefox version: n/a
  • Android device model: All.
  • Android OS version: All.

Any additional information?

  • This bug does not affect Fenix or Focus because both apps have separate fragments for the AwesomeBar. It only affects browser apps that use the same fragment for both (Reference Browser).
  • See reference-browser#3074

From my debugging, we receive the keycode event before we receive the trigger for onBackPressed, so when that happens, we are no longer in State.EDIT and ignore the back pressed event which then passes (the unhandled event) to our session navigation.

I believe the bug is that we are always returning true in the AwesomeBarFeature's ToolbarEditingListener which allows the toolbar state to change.

The AwesomeBarFeature has an OnEditListener that always returned
the callback for onCancelEditing as true. This resulted in the
Toolbar updating it's internal state from State.EDIT to
State.DISPLAY when no change had happened.

This patch uses the existing state variable to respond to the
callback which mimics the correct behaviour of the AwesomeBar.

Pushed by jonalmeida942@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3f2359e25162 Update AwesomeBarFeature.onCancelEditing based on editing state changes r=mcarare,android-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: