Closed Bug 1627556 Opened 3 years ago Closed 3 years ago

Calendar, tasks tabs do not fire browser.tabs.on* events

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 77.0

People

(Reporter: buecher, Assigned: darktrojan)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

I log tabId's of various tabs. Calendar and tasks do not trigger tabs.onActivated:

no tabId is logged. Hopefully, later we will be able to have an api for calendar. Even now: having a tabId and a windowtype for calendar would allow me to know that the user called a popup while he was on calendar (by monitoring the last active tab and its type)

function getActiveTab(activeInfo) //not triggered for calendar
{
lastMailTab=activeInfo.tabId;
console.log(lastMailTab);
}
browser.tabs.onActivated.addListener(getActiveTab);

Expected results:

should return a tabId for all tabs, even if no specific api exists yet

Blocks: webext-tb
No longer blocks: webext-tb
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Summary: calendar, tasks tabs return no tabId on onActivated → Calendar, tasks tabs do not fire browser.tabs.on* events

I started out testing the events for our most common tab types and that uncovered a whole bunch of things that don't quite work how they should. I still don't understand how this patch broke the account manager test, but I've not seen the failure anywhere else so I assume I caused it.

Attachment #9139664 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9139664 [details] [diff] [review]
1627556-tabs-events-1.diff

Review of attachment 9139664 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM, r=mkmelin
Attachment #9139664 - Flags: review?(mkmelin+mozilla) → review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9361c493ce66
Test events in the browser.tabs API and fix several things that fail. r=mkmelin DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 77.0
See Also: → 1767586
You need to log in before you can comment on or make changes to this bug.