using disabled="true" enables document.oncontextmenu behavior
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
People
(Reporter: m.phillips, Unassigned)
References
(Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
I set document.oncontextmenu = function() {return false}.
<html>
<head/>
<body onload="document.oncontextmenu = function() {return false};">
<!-- Disabled context menu should be suppressed but is NOT -->
<input type="text" size="20" disabled="disabled" class="TxtFldDis_sun4">
<textarea rows="2" cols="20" disabled="disabled"></textarea>
<!-- Context menu suppressed correctly when disabled attribute not present -->
<input type="text" size="20" class="TxtFldDis_sun4">
<textarea rows="2" cols="20"></textarea>
</body>
</html>
Actual results:
The context menu appears with a right click on the elements with the attribute
disabled="disabled"
Expected results:
The context menu should not be appearing whether the disabled attribute is present or not.
Comment 1•6 years ago
|
||
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dec6aa71da64&tochange=d8be4bc4fba8
Suspect:
801ba75ac563 Olli Pettay — Bug 816340 - Propagate events to chrome even if there is a disabled form control in the event target chain, r=jst,gavin
smaug, is this expected given bug 816340?
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Hmm, we should get the document level contextmenu.
But this stuff if being changed in bug 1540995
Comment 4•6 years ago
|
||
I think this bug is somewhat invalid. Even when disabled, the default context menu should still be presented (as :smaug states) - but perhaps preventDefault() could be used to prevent it from showing.
Updated•6 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•