Closed Bug 1644914 Opened 4 years ago Closed 3 years ago

Navigations from the location bar disappear from the session navigation history with browser.navigation.requireUserInteraction=true

Categories

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

defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox-esr91 --- disabled
firefox77 --- unaffected
firefox78 --- unaffected
firefox79 --- disabled
firefox93 --- disabled
firefox94 --- disabled
firefox95 --- fixed

People

(Reporter: robwu, Assigned: johannh)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:

  1. Open Firefox.
  2. Navigate to example.com
  3. Focus the location bar (e.g. with Ctrl-L or with clicking) and modify the URL, e.g. to example.com/1
  4. Use the back button.

Expected:

  • I should be at the page from step 2.

Actual:

  • I am at the first entry in the navigation history. When I use the forward button, I am at the page from step 3. The navigation from step 3 has unexpectedly disappeared.

The intent of bug 1515073 was to hide entries without explicit user interaction. I would say that an explicit navigation request by a user should count as an explicit user interaction.

Set release status flags based on info from the regressing bug 1515073

Yup, thanks for filing the bug, we should fix that.

Blocks: 1645211
Severity: -- → S3
Priority: -- → P2

Just noticed this: I can navigate to a whole stream of URLs via the URL bar and only the current one appears in the session history when I right-click the back button. And when I hit back it skips over all the pages I meticulously hand-navigated to. Noticed this because I sometimes hand-tweak my complex bugzilla queries in the URL bar rather than go back to the form, but when I screw up and get a broken query hitting "back" takes me back to the form, not the most recent working version.

Navigating via bookmark is the same: not added to tab session history.

Beta (Fx79) is now working fine so I guess this is a Nightly only change?

Summary: Navigations from the location bar disappear from the session navigation history → Navigations from the location bar disappear from the session navigation history with browser.navigation.requireUserInteraction=true

This should probably count any browser-chrome initiated load not happening in a new tab, such as bookmarks etc. 🤔

Assignee: nobody → jhofmann
Status: NEW → ASSIGNED

This is a pretty cheap way of fixing this bug by saying nsDocShell::loadURI calls
done with a system principal will add user interaction to the current page. This takes
advantage of the fact that all UI code for loading URIs goes through this code path.

Note that during debugging I've found other cases where SH entries would be added with
a system principal, most notably when navigating to URL hashes/fragments (example.com#hash).
I'm not sure why this is happening but it doesn't go through nsDocShell::loadURI.

Blocks: 1734181
Pushed by jhofmann@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/87ace50026b6 Give out user interactions to session history entries when system principal initiates a load. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: