Edge crashes after executing "new MouseEvent" in content script

Fixed, not yet flighted Issue #9600209

Details

Author
Alexander B.
Created
Oct 31, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14
Reports
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

Call the code in the content script

var evt = new MouseEvent("mouseclick", {
    bubbles: true,
    cancelable: true,
    view: window
});

Or use the sample extension in the attach on the URL http://www.microsoft.com/

The page will be reloaded

Reproduced on Edge 14.955 and 14393

Attachments

1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Brad E.”

    Changed Assigned To from “Brad E.” to “Scott S.”

  • Reproduced on Edge 15.14971

  • Reproduced on Edge 15.14986

  • The similar issue
    Please run the following code in the extension’s sandbox:

    var e = {
        bubbles: true,
        cancelable: true,
        view: window,
        detail: 0,
        screenX: 0, 
        screenY: 0,
        clientX: 0, 
        clientY: 0,
        ctrlKey: false,
        altKey: false,
        shiftKey: false,
        metaKey: false,
        button: 0,
        relatedTarget: undefined
    };
    var evt = document.createEvent("MouseEvents");
    evt.initMouseEvent('click', 
        e.bubbles, e.cancelable, e.view, e.detail,
        e.screenX, e.screenY, e.clientX, e.clientY,
        e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
        e.button, document.body.parentNode);
    

    Edge throws an error Unspecified error.
    at the code "initMouseEvent()"

  • Still reproduced on Edge 15.15007

  • Microsoft Edge Team

    Changed Status to “Confirmed”

  • Both cases causes “Unspecified error.” on Edge 15.15048

  • according to https://docs.microsoft.com/en-us/microsoft-edge/dev-guide/dom
    var evt = new MouseEvent(eventName, {
    'bubbles’: true,
    'cancelable’: true,
    'view’: window,
    'detail’: 0,
    'screenX’: 0,
    'screenY’: 0,
    'clientX’: 0,
    'clientY’: 0,
    'ctrlKey’: false,
    'altKey’: false,
    'shiftKey’: false,
    'metaKey’: false,
    'button’: 0,
    'relatedTarget’: null
    });
    also cause “Unspecified error.” on Edge 15

  • WORKAROUND:

    var evt = new MouseEvent(eventName, {
    'bubbles’: true,
    'cancelable’: true,
    'view’: 'window’,
    'detail’: 0,
    'screenX’: 0,
    'screenY’: 0,
    'clientX’: 0,
    'clientY’: 0,
    'ctrlKey’: false,
    'altKey’: false,
    'shiftKey’: false,
    'metaKey’: false,
    'button’: 0,
    'relatedTarget’: null
    });
    It works fine when making window as a string.

  • Microsoft Edge Team

    Changed Status from “Confirmed” to “In progress”

    Changed Status from “In progress” to “Fixed”

    Changed Status from “Fixed” to “Fixed, not yet flighted”

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

Sign in