As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 701328 - An javascript global variable named 'contextMenu' is inaccessible in the HTML element event handlers
: An javascript global variable named 'contextMenu' is inaccessible in the HTML...
Status: RESOLVED INVALID
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: 8 Branch
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 617528 702210
  Show dependency treegraph
 
Reported: 2011-11-10 03:25 PST by Dmitry Krivaltsevich
Modified: 2011-11-14 01:46 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
contextMenu bug demonstration (328 bytes, text/html)
2011-11-10 03:25 PST, Dmitry Krivaltsevich
no flags Details

Description User image Dmitry Krivaltsevich 2011-11-10 03:25:40 PST
Created attachment 573471 [details]
contextMenu bug demonstration

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

Here is short HTML for demonstration:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
<script type="text/javascript">
	var contextMenu = 'hello!';
</script>
<input type="button" value="click me" onclick="alert(contextMenu)" />
</body>
</html>					  


Actual results:

User should click 'click me' button and see alert messages with text 'hello'.


Expected results:

Firefox 8 displays alert message with text 'null'.
Comment 1 User image :aceman 2011-11-10 08:52:40 PST
Confirming.

Can this variable name clash with the contextMenu feature developed in bug 617528? That one is marked as landed in Firefox 8.
Comment 2 User image Jan Varga [:janv] 2011-11-10 09:01:55 PST
not sure if this is a bug
Comment 3 User image Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-11-10 09:11:48 PST
Yeah, that's unfortunately simply how things work :( I.e. this is what specifications require.
Comment 4 User image Olli Pettay [:smaug] (review queue closed until backlog cleared) 2011-11-10 09:43:17 PST
Yeah, this is yet another case when adding new properties to elements break existing pages.
Comment 5 User image Jan Varga [:janv] 2011-11-10 09:52:20 PST
(In reply to Olli Pettay [:smaug] from comment #4)
> Yeah, this is yet another case when adding new properties to elements break
> existing pages.

and a good reason for reworking of the command API spec as we already discussed
Comment 6 User image Boris Zbarsky [:bz] (still a bit busy) 2011-11-13 19:10:49 PST
Olli, Jonas, do we have a tracker for issues like this?

Reporter, did you run into this on existing site?  If so, which one?
Comment 7 User image Dmitry Krivaltsevich 2011-11-13 20:55:07 PST
(In reply to Boris Zbarsky (:bz) from comment #6)
> Olli, Jonas, do we have a tracker for issues like this?
> 
> Reporter, did you run into this on existing site?  If so, which one?

Our clients found this issue on existing business-application which we've developed.
Comment 8 User image Boris Zbarsky [:bz] (still a bit busy) 2011-11-14 01:46:25 PST
OK.  Marking invalid, since the spec requires this behavior... if you feel that the spec needs changing, please raise the issue with the HTML working group?

Note You need to log in before you can comment on or make changes to this bug.