Session history forgets the title of pages with forms that POST to the same URL
Categories
(Firefox :: Session Restore, defect)
Tracking
()
People
(Reporter: darktrojan, Unassigned)
Details
(Keywords: regressionwindow-wanted)
I have some extensions that use browser.sessions.getRecentlyClosed()
. I've noticed that lately many (but not all) of the tabs returned have the URL in the title property instead of the title. If I open the library the pages in question have a real title.
Mostly it happens to bugzilla.mozilla.org pages, perhaps BMO does something weird to the history. I'm fairly sure I've seen it happen on other sites too, although I can't see that at the moment.
Comment 1•3 years ago
|
||
Could you share some reproduction steps? And even if you're not able to reproduce it, try to describe what you did in as much detail as possible.
Updated•3 years ago
|
Reporter | ||
Comment 2•3 years ago
|
||
I haven't done anything in particular, just calling the function from the extension toolbox gets the same result.
There must be something weird about the tabs in question. It might be that the page has reloaded with the same URL, like it does when submitting a comment in Bugzilla. I'm going to try that now with this page.
Reporter | ||
Comment 3•3 years ago
|
||
Yeah, that seems to be a cause of the problem. So STR:
- in a Bugzilla page, make a comment or other changes and save them
- close the tab
- call
await browser.sessions.getRecentlyClosed()
in the extension toolbox and see that the tab's title is its URL
Comment 4•3 years ago
|
||
There have been some changes to Session History (for Fission) recently, is this a recent regression? Can you please run mozregression for this?
Reporter | ||
Comment 5•3 years ago
|
||
Actually it's much older than I realised, and may have always been there. I went back as far as 81 before I gave up.
I've dug about as deep as I can, and somebody who knows this code better than me will be much faster at finding the cause. Here's what I've been working on:
- Put a breakpoint here. (There's probably smarter ways to get here, but this worked for me.)
- Load an html page with a title and a form that POSTs to itself.
- Before submitting the form,
history.legacySHistory.getEntryAtIndex(1).title
is the title of the page. - Submit the form, and
history.legacySHistory.getEntryAtIndex(1).title
is now the URL of the page.
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 6•2 years ago
|
||
Considering the fact that this is not even close to a recent regression (older than Fx81, according to comment 5) and that we can't reproduce it with the steps provided, I will remove it from our QA triage list.
I would be happy to attempt another investigation if more clear reproduction steps are provided. Please NI me if that's the case.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•4 months ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #3)
Yeah, that seems to be a cause of the problem. So STR:
- in a Bugzilla page, make a comment or other changes and save them
- close the tab
- call
await browser.sessions.getRecentlyClosed()
in the extension toolbox and see that the tab's title is its URL
Hey Geoff, is this bug still an issue? If so, does it also manifest in the Recently Closed Tabs menu or just when using the extension API?
Reporter | ||
Comment 8•4 months ago
|
||
I think it's now working properly in the UI but not in the API. IIRC it affected things like the back button context menu and history menu too, which I will check once I've submitted this comment.
Reporter | ||
Comment 9•4 months ago
|
||
The back button menu is still affected, but the history menu is not.
Description
•