Note that there are some explanatory texts on larger screens.

plurals
  1. PODisabled form element and oncontextmenu issue
    text
    copied!<p>we have an issue where a <strong>disabled form element</strong> (input, textarea, ...) does not react to a <strong>right-click action</strong> (oncontextmenu attribute). Everything works fine when the form element is enabled. Please consider the following pseudo-code:</p> <pre><code>&lt;div id="test" oncontextmenu="someFunction()"&gt; &lt;input id="textbox" type="text" disabled="disabled"&gt; SOME_PADDING &lt;input id="calendar" type="image" disabled="disabled"&gt; &lt;/div&gt; </code></pre> <p>The real catch is it <strong>does not work</strong> in Chrome and Firefox, but it <strong>does work</strong> in IE8 and Opera. </p> <p>When we right-click on the textbox or calendar elements in Chrome or Firefox, nothing happens. If we click <strong>in between the elements (SOME_PADDING)</strong> then the right-click menu does appear. </p> <p>Hence it seems as if a <strong>right-click action on a disabled form does not work in Chrome and Firefox</strong>. Has anyone experienced a similar behaviour before?</p> <p>Thanks in advance!<br> Stijn</p> <p>EDIT: As mentioned by Pekka, a disabled form element not reacting to a right-click does make sense. The real issue seems to be the oncontextmenu attribute of the div around it not reacting properly when clicking on a disabled form element in Firefox / Chrome. </p> <p>EDIT2: Online example can be found here: <a href="http://jsbin.com/isite4/6" rel="nofollow">http://jsbin.com/isite4/6</a> - This works in all but IE8. Any proposed work-arounds to force IE to behave normally?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload