Clicking a href link with javascript code inside fires window.onbeforeunload

Not reproducible Issue #2325752

Details

Created
Apr 10, 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/nvmrm8wr/

Repro Steps:

  1. Create an html page with the following markup:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
window.onbeforeunload = function () { alert(“onbeforeunload”); }
</script>
</head>
<body>
<a href="javascript:void(0);">click me</a>
</body>
</html>

  1. Click the link.

See the attached file.

Expected Results:

The window.onbeforeunload event isn’t fired.
Other browsers (Chrome, Firefox, Safari and Opera) don’t fire the mentioned event in this case.

Actual Results:

Dev Channel specific:

No

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Kamen M.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “IE S.”

      Changed Status to “Not reproducible”

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

    Sign in