-
-
Notifications
You must be signed in to change notification settings - Fork 123
Description
In my (own) electron browser I'm using electron-chrome-extensions.
We can create background tabs (i.e. leaving the current tab still selected) and then call the addTab in ElectronChromeExtensions class to publish that it now exists.
The problem is that this will ALWAYS be immediately selected within ElectronChromeExtensions, even though it was opened in the background. This is because the addTab emits "tab-added" which is listened to by observeTab which itself calls onActivated with the new tab id.
This in turn then calls the selectTab callback function defined when creating the new ElectronChromeExtensions (not sure if this should really be called when adding a tab anyway? but thats a different discussion)
Request: There should be a way to call addTab which an option to say its opening in the background so that it doesn't affect the currently selected tag
Currently the workaround is to immediately call the ElectronChromeExtensions call function 'selectTab' with the old tabid immediately after adding it but this can cause extensions the activate a couple of times unnecessarily.