Open Bug 1645231 Opened 4 years ago Updated 8 months ago

Back button menu doesn't show current entry without user interaction when navigated to from the page

Categories

(Core :: DOM: Navigation, defect, P3)

defect

Tracking

()

People

(Reporter: johannh, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: testcase-wanted)

Attachments

(5 files, 1 obsolete file)

STR:

  1. On https://johann-hofmann.com/back-button, hover one of the lower buttons for 3s to initiate a navigation without user gesture.
  2. Repeat step 1.
  3. Hover the button for history.back() for 3s
  4. Open the back button menu

You'll notice that the current entry is not shown as expected. It's hidden because technically it didn't have user interaction. We should probably still show it.

URL in comment 1 is 404; looks like we need a new testcase.

Keywords: testcase-wanted
Attached file New testcase (obsolete) —

I've provided what is hopefully an equivalent test case.

(In reply to Adam Vandolder [:avandolder] from comment #2)

I've provided what is hopefully an equivalent test case.

Thanks! Could you write down some updated STR & expected/actual results for your testcase, too?

(Perhaps similar to comment 0, though comment 0 starts out talking about "one of the lower buttons" and in your testcase there are only 3 buttons all on the same line, so I'm not sure how different the STR are meant to be.)

Flags: needinfo?(avandolder)
Attached file Fixed test case

(I noticed I had made a typo in the previous attachment, here's a fixed version)

New test case steps:

  1. Enable browser.navigation.requireUserInteraction pref.
  2. Hover over either of the "Next" buttons for at least 3 seconds, in any order, to generate a series of navigations.
  3. Hover over the "Go Back" button for 3 seconds.
  4. Check the back button menu; the current history entry will not appear in the list.
Attachment #9392309 - Attachment is obsolete: true
Flags: needinfo?(avandolder)

thanks. Just for completeness, here's a screencast of what I see with that testcase/STR -- it's subtle but I think I'm seeing the bug.

It looks like really browser.navigation.requireUserInteraction just makes us de-duplicate the entries in the back menu, I think?

That means repeated visits to a given URL (from hovering back and forth between the buttons in the testcase) only show up once in the back menu, and when you hover "go back" to navigate back to one of them, then it ~reasonably doesn't show up in the back menu since the visits to that site were de-duplicated into a single menu entry which you've just navigated back to.

[EDIT: er, my next comment here -- comment 6 -- has a screencast that more-clearly shows the de-duplication, particularly as compared to the reference behavior (with the pref set to false) in comment 7.]

Attachment #9393817 - Attachment description: screencast of bug → screencast of bug when hovering "next 1" / "next 2" just once

Here's how this looks when browser.navigation.requireUserInteraction is false (the default). The history menu shows many entries, once for every time that I hovered "next 1" / "next 2" -- it's not de-duplicated as it was in the previous screencast.

Aha -- comparing the screencasts, I see that normally the back menu would show a bolded entry for the URL that you're currently viewing (that's present when the menu opens at the end of comment 7), and that bolded entry is completely absent in the buggy scenario (comment 5 / 6). That's presumably the main bug here.

Attachment #9393819 - Attachment description: screenshot of reference behavior when browser.navigation.requireUserInteraction is false (default) and hovering "next 1" / "next 2" many times → screencast of reference behavior when browser.navigation.requireUserInteraction is false (default) and hovering "next 1" / "next 2" many times
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: