Toolbar does not restore focus after popup dismissal

By design Issue #13031516


Jamie P.
Aug 1, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

This is similar to Issue #4553802 but involves using the toolbar. Interacting with a toolbar button does not properly restore focus to the content document once the UI for the toolbar button is dismissed.

Steps to reproduce

  1. Visit the same JSFiddle from Issue #4553802:
  2. Click into the result pane in the bottom right quadrant
  3. Press return
  4. Dismiss the alert via mouse or keyboard
  5. Click the Share button in the Edge toolbar.
  6. Press escape to dismiss the share interface
  7. Press return

Expected results

The test alert from the JSFiddle should once again fire.

Actual results

The share interface displays again.

Other Notes

We discovered this in the process of testing the 1Password extension in Edge. 1Password has a feature called autosubmit where, after filling the user’s credentials, 1Password will simulate a press of the return key. Our extension takes pains to ensure a password field has focus via querySelector(":focus") before initiating the submit. Edge reports that the password field does still have focus, so the extension instructs the 1Password application to simulate the keystroke, upon which, the 1Password button is activated again causing the 1Password interface to pop up.

This issue is particular to the toolbar button, which we verified by using a few different entry points for 1Password filling. For instance, right clicking in the page and using the context menu to show 1Password allowed us to submit properly after filling. This also disproved our initial hypothesis that the change of application from Edge to 1Password and back contributed to this focus issue.

We have a similar issue with Chrome where when the omnibar can retain focus and refuse to transfer focus to the password element even after the extension calls .focus() on the element. Unlike Edge, though, Chrome returns null for the querySelector call and 1Password properly avoids unexpected behavior.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Laura M.”

      Changed Status to “By design”

    • Hello,

      Thank you for providing this information about the issue. When you click a focusable button, focus goes there; when the flyout invokes as part of the press, focus moves to the flyout. When you dismiss the flyout associated with a button using escape, the focus should move back to that originating button. Currently, we do not plan to change this behavior. Please update this case if you can provide new information for us to consider.

      Best Wishes,
      The MS Edge Team

    • @James M. thanks for detailed explanation, however I’d like to bring attention to specific issue:

      Edge reports that the password field does still have focus

      If for some reason focus stays with button, then at least selector must not report HTML element focused anymore.

    • @James, this is also inconsistent with how other browsers work.

      For an example;

      1. Go to in Chrome or Firefox
      2. Type in any open text field, like your first name
      3. Click to bookmark the site, once you’re done with adding the bookmark, keep typing and it is still does in the name field.
      4. In Edge, it does not do this when you bookmark the site while typing into Facebook.

      I’d like your team to reconsider this because the toolbar is not the primary focus for the users, the site is. When the user is done with the toolbar, it should return the focus to the site, both for the browser actions and for the extensions.

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

    Sign in