After hiding a div element that has an input with focus, the focus remains on the same input

Confirmed Issue #1308960 • Assigned to Greg W.

Details

Created
Jan 8, 2015
Privacy
This issue is public.
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

URL: http://jsfiddle.net/119ozg57/

Repro Steps:

BAD---------------------------------------------
<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(document.body).ready(function(){
$(“#test”).focus();

            setTimeout(function(){
                $(".search-box").addClass("hidden");                  
            }, 500);

        });
    </script>
    <style type="text/css">
        .hidden{
            display: none;
        }
    </style>
</head>
<body>
    <div class="search-box">
        <input type="text" id = "test">
    </div>
</body>

</html>

GOOD-------------------------------------------------------------------------------------------------
<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(document.body).ready(function(){
$(“#test”).focus();

            setTimeout(function(){
                $(".search-box").hide()                  
            }, 500);

        });
    </script>
    <style type="text/css"></style>
</head>
<body>
    <div class="search-box">
        <input type="text" id = "test">
    </div>
</body>

</html>

Expected Results:

The focus should be removed from the input element even when hidden the parent div using css.

Actual Results:

Dev Channel specific:

Yes

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Sermet I.”

      Changed Assigned To to “Rossen A.”

      Changed Assigned To from “Rossen A.” to “IE F.”

      Changed Status to “Won’t fix”

      Changed Assigned To to “Greg W.”

      Changed Status from “Won’t fix”

      Changed Status to “Confirmed”

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

    Sign in