Toolbar does not restore focus after popup dismissal

By design Issue #13031516

Details

Author
Jamie P.
Created
Aug 1, 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

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: https://jsfiddle.net/cwa4mz29/
  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.

Attachments

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.

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

    Sign in