[Webkit-unassigned] [Bug 81853] DOM 3 Event, mousedown and mouseup default actions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 15 20:59:39 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=81853





--- Comment #5 from Brandon Andrews <sirisian at gmail.com>  2012-07-15 20:59:38 PST ---
Here's a test case quickly:
http://sirisian.com/javascript/dom3mouse.html
source:
<!doctype html>
<html lang="en">
<head>
<title>Dom 3 Mouse</title>
<script type="text/javascript">
"use strict";

window.onload = function()
{
    var target = document.getElementById("region");
    target.addEventListener("mousedown", function(e)
    {
        e.preventDefault();
    }, false);
    target.addEventListener("mouseup", function(e)
    {
        e.preventDefault();
    }, false);
};
</script>
</head>
<body style="margin: 0;padding: 0;">
    <div id="region" style="width:2000px; height:2000px; background-color:#f0f;"></div>
</body>
</html>

The mousedown for the middle mouse works flawlessly. e.preventDefault stops the middle mouse pan from starting. The right click does not. So the fix that needs to be implemented for the mouseup is that if javascript calls e.preventDefault() then don't execute the default action of creating a context menu.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list