Closed
Bug 1411554
Opened 8 years ago
Closed 8 years ago
when new tab is created browser.tabs.onCreated.addListener return about:blank sometime instead of about:newtab
Categories
(WebExtensions :: Frontend, defect)
Tracking
(firefox57 wontfix)
RESOLVED
WORKSFORME
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | wontfix |
People
(Reporter: rpwstuff, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
Steps to reproduce:
browser.tabs.onCreated.addListener(handleCreated);
function handleCreated(tab) { console.log(tab.url); }
in background script;
Actual results:
When I first open Firefox and click on a new tab I get about:blank - most of the time. If i recheck the tab 100 ms later I get about:newtab There seems to be a race problem.
Expected results:
I should have got about:newtab
Updated•8 years ago
|
Component: Untriaged → New Tab Page
Updated•8 years ago
|
Component: New Tab Page → WebExtensions: Frontend
Product: Firefox → Toolkit
Comment 1•8 years ago
|
||
This is the expected behavior. The final URL of a tab is not always known when it's first created. You need to listen for an onUpdated event if you want to know what actually winds up loaded into the tab.
Updated•8 years ago
|
status-firefox57:
--- → wontfix
Updated•8 years ago
|
Flags: needinfo?(amckay)
Comment 2•8 years ago
|
||
This sounds like its by design based on comment 1.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(amckay)
Resolution: --- → WORKSFORME
Updated•8 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•