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

Not reproducible Issue #2325752


Apr 10, 2015
This issue is public.
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce


Repro Steps:

  1. Create an html page with the following markup:

<!DOCTYPE html>
<html xmlns="">
<script type="text/javascript">
window.onbeforeunload = function () { alert(“onbeforeunload”); }
<a href="javascript:void(0);">click me</a>

  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:



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”

    • 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 creator’s update 15063 or the insider build 16199.

      Best Wishes,
      The MS Edge Team

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

    Sign in