Closed Bug 1797949 Opened 2 years ago Closed 2 years ago

[MV3] Only the first action.onClicked event is executed, if background page was terminated and had to be restarted

Categories

(WebExtensions :: General, defect)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1795801

People

(Reporter: TbSync, Unassigned)

References

Details

Consider a simple background page in an MV3 extension (manifest does not declare a popup of course):

browser.action.onClicked.addListener(() => {
  console.log("I am #1")
})

browser.action.onClicked.addListener(() => {
  console.log("I am #2")
})

Both console logs are printed when the action button is clicked after install. However, when the background page is terminated and the button is clicked, only the first one is printed on the first click on the action button (which restarts the background). On the second click, both are printed again.

Expected behaviour:

All listeners are executed.

Blocks: 1797764
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1795801
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.