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)

56 Branch
defect
Not set
normal

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
Component: Untriaged → New Tab Page
Component: New Tab Page → WebExtensions: Frontend
Product: Firefox → Toolkit
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.
Flags: needinfo?(amckay)
This sounds like its by design based on comment 1.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(amckay)
Resolution: --- → WORKSFORME
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.