Permalink
Browse files

Fix IE < 9 event.srcElement issue

  • Loading branch information...
1 parent 81ccdb8 commit 7f3a45add63c56c5c0f6df83d3079760b518d4dc @rniemeyer committed Nov 28, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 build/knockout-delegatedEvents.js
  2. +2 −2 build/knockout-delegatedEvents.min.js
  3. +1 −1 header.js
  4. +1 −1 src/knockout-delegatedEvents.js
@@ -1,4 +1,4 @@
-//knockout-delegatedEvents v0.1 | (c) 2012 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
+//knockout-delegatedEvents v0.1.1 | (c) 2012 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
(function(factory) {
//CommonJS
if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
@@ -15,7 +15,7 @@
var createDelegatedHandler = function(eventName, root) {
return function(event) {
var data, method, action, owner, matchingParent, command, result,
- el = event.target,
+ el = event.target || event.srcElement,
context = ko.contextFor(el),
attr = "data-" + eventName,
key = prefix + eventName;

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1 +1 @@
-//knockout-delegatedEvents v0.1 | (c) 2012 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
+//knockout-delegatedEvents v0.1.1 | (c) 2012 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
@@ -14,7 +14,7 @@
var createDelegatedHandler = function(eventName, root) {
return function(event) {
var data, method, action, owner, matchingParent, command, result,
- el = event.target,
+ el = event.target || event.srcElement,
context = ko.contextFor(el),
attr = "data-" + eventName,
key = prefix + eventName;

0 comments on commit 7f3a45a

Please sign in to comment.