Closed
Bug 320159
Opened 20 years ago
Closed 18 years ago
Default context menu disabling when using inline SVG
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jophof, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
746 bytes,
application/xml
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
<html xmlns="http://www.w3.org/1999/xhtml">
<body oncontextmenu='return (false) '>
<link href="../../include/contextmenu/contextmenu.css" rel="stylesheet" type="text/css" />
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="99%"
height="99%"
onload="init()">
<script type="text/javascript"> <![CDATA[
var svgDocument=document;
var root = document.documentElement;
var drawBoard,background, root;
var odiagram=null, textcontainer;
var oserver = new Object();
/*
* Onload event this is the first routine fired
*/
function init(e) {
var oel = document.getElementById ('diagramtitlebackground');
oel.addEventListener ("mouseup", backgroundup, false);
}
function backgroundup (e) {
e.stopPropagation();
e.preventDefault();
}
]]></script>
<svg preserveAspectRatio="xMinYMin slice" width="100%" height="55">
<rect id='diagramtitlebackground' width='100%' height='800%' style='fill:url(#backgroundGradient)'/>
</svg>
</body>
</html>
When using right click mouse on the canvas the stoppropogation and preventdefault do nothing. The file is run from a tomcat server.
Reproducible: Always
Steps to Reproduce:
See the example above
| Reporter | ||
Comment 1•20 years ago
|
||
Updated•20 years ago
|
Attachment #205753 -
Attachment mime type: text/plain → text/html
Updated•20 years ago
|
Attachment #205753 -
Attachment mime type: text/html → application/xhtml+xml
Updated•20 years ago
|
Component: General → SVG
Product: Firefox → Core
Version: unspecified → 1.8 Branch
Updated•20 years ago
|
Assignee: nobody → general
QA Contact: general → ian
Comment 2•19 years ago
|
||
Can you attach a better testcase? There is no backgroundGradient in your testcase. Also, is mouseup supposed to do anything with the right-mouse button? Does this work in any user agent? It doesn't work in O9 either, I still see a right-click context menu.
Comment 3•18 years ago
|
||
You need to listen for the 'contextmenu' event, not 'mouseup'.
Attachment #205753 -
Attachment is obsolete: true
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•