chrome.tabs.move gets confused about tab index when the given list of tabs are in different windows |
||
Issue descriptionChrome Version: 54.0.2804.0 chrome.tabs.move() accepts a list of tabIds. This is implemented by iterating over a list of tab IDs and then moving all tabs to a specified index, and after every iteration this index is incremented [1]. That logic makes sense for tabs within a single window, but is flawed when the list of tab IDs refer to tabs in multiple windows. To reproduce, 1. Load the attached extension. 2. Open two new tabs and example.com after that. 3. Open a new window, with two new tabs and example.com after that. 4. Click on the extension button, which basically runs chrome.tabs.move([tabIdFromWindow1, tabIdFromWindow2], {index: 0}); Expected: - Either all selected tabs are moved to the first place in their originating window. - Or all selected tabs are moved to the first place in the first matching window. Actual: - The tabs appear to be moved to an arbitrary position, using the logic that I described at the top of this report (see [1]). [1] https://chromium.googlesource.com/chromium/src/+/165732a4b1dec1676bf479f2fed9a8df2a73316f/chrome/browser/extensions/api/tabs/tabs_api.cc#1499
,
Feb 6 2017
Issue also appearing if the tabs are in the same window. Just copy and paste the attached into a background.html inspector window.
,
Mar 9 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||
►
Sign in to add a comment |
||
Comment 1 by asargent@chromium.org
, Jul 22 2016