windows are never reported as focused when retrieved through windows.getLastFocused/windows.get

Confirmed Issue #13011781 • Assigned to Steven K.

Details

Author
V S.
Created
Jul 31, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
40.15063
Reports
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

setTimeout(() => browser.windows.getLastFocused(win => alert("focused: " + win.focused)), 1000);
and then focus the browser window in time to rule out that the extension tools have focus.
Alternatively, load the attached extension.

expected: focused to be true
got: focused is false

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

    Changed Status to “Confirmed”

  • I reproduced the same thing in Microsoft Edge 41.16281.1000.0 by setting up an onFocusChanged listener in the background page console:

    chrome.windows.onFocusChanged.addListener(function(windowId) { console.log("Window id is " + windowId); chrome.windows.getCurrent({}, function(w) { console.log(w) })});
    

    When I tab to the developer tools, the windowId is properly reported as -1 and the current window’s focused attribute is false. But when I tab back to the window showing my extension button, the current window’s focused attribute is still false even though the newly focused window is 1.

  • I reproduced the same thing in Microsoft Edge 41.16281.1000.0 by setting up an onFocusChanged listener in the background page console:

    chrome.windows.onFocusChanged.addListener(function(windowId) { console.log("Window id is " + windowId); chrome.windows.getCurrent({}, function(w) { console.log(w) })});
    

    When I tab to the developer tools, the windowId is properly reported as -1 and the current window’s focused attribute is false. But when I tab back to the window showing my extension button, the current window’s focused attribute is still false even though the newly focused window is 1.

  • Microsoft Edge Team

    Changed Status from “Confirmed”

    Changed Status to “Confirmed”

You need to sign in to your Microsoft account to add a comment.

Sign in