Microsoft Edge freezes when focus changes quickly and from within a setTimeout.

Not reproducible Issue #14280302


Christopher S.
Oct 17, 2017
This issue is public.
Found in
  • Microsoft Edge
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

There seems to be an issue in Edge that occurs when focusing an element from within a setTimeout. The code below will cause Edge to freeze if you select one of the elements and then hold down a key. Focus will toggle between the two elements until the browser freezes. The only way to unfreeze the browser is by clicking somewhere outside of the page. This seems to require one of the elements to be a text field and the calls to focus need to be within a setTimeout.

    <title>Focus Input on Timeout Problem Demo</title>
      *:focus {
        outline: solid red 2px;

      #div {
        background-color: blue;
        height: 100px;
        width: 100px;
      var toggle = true;
      function switchFocus(e) {
        var div = document.getElementById("div");
        var input = document.getElementById("input");
        if( === input) {
          setTimeout(function() {
        } else {
          setTimeout(function() {
        toggle = !toggle;
    <div onkeydown="switchFocus(arguments[0])"> 
      <div id="div" tabIndex="0"></div>

      <input id="input" type="text"></input>


1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

  • Hello,

    Thank you for providing this information about the issue. After thorough testing, we are unable to reproduce this problem in Edge. Please test this behavior in our latest public stable build 15063 or the insider build 17017.

    Best Wishes,
    The MS Edge Team

  • Microsoft Edge Team

    Changed Status to “Not reproducible”

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

Sign in