New issue
Advanced search Search tips

Issue 875585 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Inconsistent clearance of tab multiselection when changing selected tab

Project Member Reported by obru...@igalia.com, Aug 18

Issue description

Chrome Version: 68.0.3440.106
OS: Lubuntu 18.04 LTS

What steps will reproduce the problem?
Run this code in an extension:

  new Promise((resolve) => {
    chrome.windows.create({url: "about:blank?1"}, ({id: windowId}) => {
      chrome.tabs.create({url: "about:blank?2", windowId}, () => {
        chrome.tabs.create({url: "about:blank?3", windowId}, ({id}) => {
          chrome.tabs.highlight({tabs: [2, 0, 1], windowId}, () => {
            chrome.windows.create({tabId: id}, () => {
              chrome.tabs.query({highlighted: true, windowId}, ({length}) => {
                console.log("Test 1 - Highlighted tabs:", length);
                chrome.windows.remove(windowId, () => {
                  chrome.tabs.remove(id, resolve);
                });
              });
            });
          });
        });
      });
    });
  }).then(() => new Promise((resolve) => {
    chrome.windows.create({url: "about:blank?1"}, ({id: windowId}) => {
      chrome.tabs.create({url: "about:blank?2", windowId}, ({id}) => { 
        chrome.tabs.highlight({tabs: [0, 1], windowId}, () => {
          chrome.tabs.update(id, {active: true}, () => {
            chrome.tabs.query({highlighted: true, windowId}, ({length}) => {
              console.log("Test 2 - Highlighted tabs:", length);
              chrome.windows.remove(windowId, resolve);
            });
          });
        });
      });
    });
  }));

What is the expected result?
Both tests change the selected tab in a window, so they should be consistent with the clearance of the highlighted tabs.

What happens instead?
Test 1 does not clear the highlighted tabs (it gets 2 of them at the end) and test 2 does (it only gets 1, the selected tab).

Both tests get 1 highlighted tab in Firefox, see https://bugzil.la/1481185
 

Sign in to add a comment