Closed Bug 702125 Opened 14 years ago Closed 14 years ago

Setting readonly 'contextMenu' attribute doesn't work

Categories

(Core :: DOM: Core & HTML, defect)

8 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: chafy, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 Build ID: 20111104165243 Steps to reproduce: Trying to **** property "oncotextMenu" to any dom element (td and body in my case) DOMelement.oncotextMenu = some object Actual results: DOMelement.oncotextMenu has no **** value - it return null Expected results: It should return the assigned object
I think that the HTML5 oncotextmenu property support is the main reason that that bug happens.
Please provide a public URL or reduced test case that exhibits this issue.
Hi, It was my mistake - the property is "cotextMenu" not "oncotextMenu" You can see example that I made here: http://chafy.net/firefoxbug.php The property .contextMenu seems to be a black hole. It is working in every browser including Firefox 7.x but not Firefox 8.0
What are you trying to do with this code? Are you trying the contextMenu feature of HTML5? That was not supported in FF7, so it can't have worked.
Blocks: 617528, 702210
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
Invalid as filed: we added a readonly contextMenu attribute to HTMLElements (per HTML <http://www.whatwg.org/html/#dom-contextmenu>), so setting it will not do anything. I recommend not setting properties on DOM objects without using a private prefix or some such.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Summary: contextMenu dom → Setting readonly 'contextMenu' attribute doesn't work
I think that that property "contextmenu" must act like it does now (readonly) only when <!DOCTYPE html> is present - HTML5 and not for XHTML. This bug occurs in old versions of DHTMLX grid (dhtmlx.com) I have fixed my copy, but I am sure that many companies will have problems with that.
There are no versions on the Web. (Also, it would need considerable implementation complexity to implement such a measure.)
> I think that that property "contextmenu" must act like it does now (readonly) only when > <!DOCTYPE html> is present - HTML5 and not for XHTML. That would actually be a violation of the spec defining the text/html MIME type.... I do think we need to make it clearer to people that now that the web platform is evolving once more they really need to stop using barewords in on* attributes and use things like window.contextMenu.....
Resolution: INVALID → DUPLICATE
Note that this has nothing to do with barewords in on* attributes, but rather with setting a property on a DOM element: document.getElementById('sampleDiv').contextMenu = { 'property1':'value1', 'property2':'value2' } as the reporter corrected in comment 3.
Resolution: DUPLICATE → INVALID
Oh, I missed that. In that case, fixing the dependencies...
No longer blocks: 702210
You need to log in before you can comment on or make changes to this bug.