diff --git a/CHANGELOG b/CHANGELOG index 59548a1..ec6d0c8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Ensure Event.* generic methods work in IE, even when the event is not extended. [Viktor Kojouharov, Andrew Dupont] + * Don't translate "keypress" events into "keydown" events. [sam] Note: "keypress" is broken in Safari <= 2.x, but Event#stop has no effect on "keydown" events. diff --git a/src/event.js b/src/event.js index e6ff428..6c7ce63 100644 --- a/src/event.js +++ b/src/event.js @@ -56,7 +56,7 @@ Event.Methods = (function() { isRightClick: function(event) { return isButton(event, 2) }, element: function(event) { - var node = event.target; + var node = Event.extend(event).target; return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node); }, @@ -78,6 +78,7 @@ Event.Methods = (function() { pointerY: function(event) { return Event.pointer(event).y }, stop: function(event) { + Event.extend(event); event.preventDefault(); event.stopPropagation(); } diff --git a/test/functional/event.html b/test/functional/event.html index d0dfc37..378b2fb 100644 --- a/test/functional/event.html +++ b/test/functional/event.html @@ -58,6 +58,8 @@
A basic event test - click here
click to stop observing the first test
+click to ensure generic Event methods work on inline handlers
+