Javascript keydown events not firing after .fadein()

Not reproducible Issue #7876926

Details

Author
Charles G.
Created
Jun 13, 2016
Privacy
This issue is public.
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

I am currently using Windows 10 14361.

After fading in a modal div, the document seems to lose focus - causing keydown, keyup, and likely other events to no longer fire without refocusing on the document by either clicking on the page, or with a $(document).focus(); command. This behavior is specific to Edge. IE, Chrome, and Firefox do not exhibit this behavior.

$(‘#modal-AjaxCommunicating’).fadeIn();

    // Close modal dialog by pressing enter or escape
    $(document).keyup(function (e) {
        if (e.keyCode == 13 || e.keyCode == 27) {
            if ($('#modal-AjaxCommunicating').is(':visible')) {
                $('#modal-AjaxCommunicating').fadeOut();
            }
        }
    });

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

    • I am not able to repro this as you have described. I grabbed a quick sample of a fadeIn from the jquery documentation and setup a repro here:

      http://codepen.io/bledwards1/pen/EyQmyA

      You will notice that I have added a else command to fire an alert anytime it detects anything other than a keycode of 13 or 27. I feel like I am missing what you are trying to convey, though since I am using a different way of fading in the modal dialogue.

      Could you provide / alter the repro I provided in order to better demonstrate the problem you are seeing with Edge on your end?

      Best regards,
      The MS Edge Team

    • We
      have not received a response with more details - this item of feedback will be
      closed soon unless we are able to obtain more information.

    • Microsoft Edge Team

      Changed Status to “Not reproducible”

    • After more research it seems that the issue is that MS Edge does not return focus to the document after a javascript prompt();

      The other major browsers do.

      document.focus();

      after the prompt will work around the behavior. however I think it should be fixed in Edge.

    • Can you provide us with a repro URL or reduced case? We would be interested in achieving higher parity with other major browsers.

    • I don’t know if it is related however I am experiencing similar symptoms as above. Edge team. Contact me directly for a repo URL.

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

    Sign in