When the tabs affected by this add-on are set to be opened in background, the tabs are in fact opened in foreground. I didn't know this was the intended behavior.
The code that should set the previous tab as active has no effect:
|
if (loadInBackground) { |
|
browser.tabs.update(lastActiveTab.id, { active: true }); |
|
} |
Proposed solution:
- open tabs in foreground by default
- existing users will see a break of behavior, I don't know if the property can be reset (otherwise it can be renamed)
- fix the bug
Note: I have working code that fixes the bug, but I'm concerned about the breaking change. e8e0392
Note 2: With the fix, it will noticeably move to the new tab then back to the previous tab, but I don't believe it can be corrected (an option could be added to do not set the new tab as active).
When the tabs affected by this add-on are set to be opened in background, the tabs are in fact opened in foreground. I didn't know this was the intended behavior.
The code that should set the previous tab as active has no effect:
pinned-tab-fix/background-script.js
Lines 49 to 51 in fdd975f
Proposed solution:
Note: I have working code that fixes the bug, but I'm concerned about the breaking change. e8e0392
Note 2: With the fix, it will noticeably move to the new tab then back to the previous tab, but I don't believe it can be corrected (an option could be added to do not set the new tab as active).