Closed Bug 320159 Opened 20 years ago Closed 18 years ago

Default context menu disabling when using inline SVG

Categories

(Core :: SVG, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jophof, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

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
Attached file Example code (obsolete) —
Attachment #205753 - Attachment mime type: text/plain → text/html
Attachment #205753 - Attachment mime type: text/html → application/xhtml+xml
Component: General → SVG
Product: Firefox → Core
Version: unspecified → 1.8 Branch
Assignee: nobody → general
QA Contact: general → ian
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.
You need to listen for the 'contextmenu' event, not 'mouseup'.
Attachment #205753 - Attachment is obsolete: true
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.

Attachment

General

Creator:
Created:
Updated:
Size: