views:

22

answers:

0

The question is: should the disabled element produce an event that will be triggered on its parent(s)?

<div id="test">
  <button disabled="disabled">Click me</button>
</div>
<script type="text/javascript">

document.getElementById("test").onclick = function() {
  alert("Clicked!");
};

</script>

All browsers except IE prevent the event from being fired, but IE doesn't. Is this behavior documented or standardized? Which of browsers process the code above correctly?