Open
Bug 1414643
Opened 7 years ago
Updated 3 years ago
webNavigation.TransitionType is "link" even when restoring a tab
Categories
(WebExtensions :: General, defect, P3)
Tracking
(firefox57 wontfix)
NEW
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: dev+mozilla, Unassigned)
Details
Attachments
(1 file)
597 bytes,
application/zip
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171027085204
Steps to reproduce:
Currently, when a tab is closed and then restored, webNavigation.onCommitted
is fired with details.transitionType set to "link". This makes it hard for extensions to reliably differentiate between a navigation caused by opening/restoring a tab and a link clicked by a user. Restoring a tab is semantically also much closer to a "reload" instead of a "link".
Proposal: When a tab is restored, make details.transitionType be either "reload", or a new member "restore".
This bug/request is for addons that need to execute some action only if the tab was navigated by the user but not otherwise (or vice-versa). Listening for a tab's creation can work, but due to the async nature of the API and having to listen to both onCommitted and onCreated, race conditions can exist. It doesn't help if onCreated is always fired first as other calls inside (such as browser.sessions.getTabValue) are still async.
Comment 1•7 years ago
|
||
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webNavigation/TransitionType
> "reload"
> The user reloaded the page, using the Reload button or by pressing Enter in the address bar. This is also used for session restore and reopening closed tabs.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•7 years ago
|
status-firefox57:
--- → wontfix
Priority: -- → P3
Reporter | ||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Just uploaded a test 'add-on' to show the bug. Steps to reproduce:
1 - "web-ext run" on FF57 to load the plugin temporarily
2 - open the browser console
3 - make sure at least two tabs are loaded
4 - close one tab, then restore it
Console will show "link", but according to documentation it should show "reload". "reload" needed for addons to allow described use-case.
"status-firefox57: --- → wontfix" means you'll fix it just not for FF57, I guess?
Updated•7 years ago
|
Product: Toolkit → WebExtensions
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•