Chrome.tabs.highlight API Broken
-
Edit: Submitted as
VB-90915 - The chrome.tabs.highlight extension API method fails to select tabs
The Chrome extension API to highlight tabs seems to not work in Vivaldi
5.3
and5.4
.To test, open a devTools window for the UI and run this in the console:
chrome.windows.getAll({ windowTypes: ["normal"] }, (windows) => { windows.forEach((window) => { chrome.tabs.highlight({ tabs: [0, 1], windowId: window.id }); }); });
Expected Result:
The first 2 tab of each open window should be highlighted like so:Actual Result:
Vivaldi just switches to the first tab of the window and makes it active. This still happens if you specify a specific window ID and also if you leave the window ID out and run the API call from an extension.
I also tried using the
update
method to change both theselected
andhighlighted
properties individually and together, but neither worked.chrome.tabs.update(SOME_TAB_ID, { highlighted: true, selected: true });
The specified tab just gets activated like with the
highlight
method.I tried running the
highlight
method in Chrome104.0.5112.81
with an extension and it worked properly, so it is unique to Vivaldi.Can anyone else confirm this?
-
@nomadic I can confirm that. Do extensions use it?
-
@nomadic Your "bug reports" are definitely the geekiest
-
@nomadic Had you sent a bug report, i cant find a entry?
-
@luetage Thanks for confirming. Can never be too sure that I didn't accidentally break something by fiddling around in Vivaldi's files. Really shouldn't do all my development on my main profile, but
️
Do extensions use it?
It definitely seems like a niche method that wouldn't see too much use, but now that Chrome has tab groups, there might be a few extensions that use it in some way.
I only found out it wasn't working because it didn't work in a simple extension I was writing to select all tabs.
@Pathduck You know it
@DoctorG Was just confirming it wasn't just me before making the report. Will make an official bug report now.
Edit: Submitted as
VB-90915 - The chrome.tabs.highlight extension API method fails to select tabs
Also didn't realize that one of my extensions was messing with my User-Agent string before submitting the report. Disabled now.