Fixes #796 - Fix events for event targets that are SVGElementInstance types in IE11.

This commit is contained in:
Austin Kelleher 2017-08-10 11:35:34 -04:00
parent b16e16a556
commit f5ebf16579

View File

@ -76,6 +76,11 @@ function attachBubbleEventListeners(doc) {
return;
}
// event.target of an SVGElementInstance does not have a
// `getAttribute` function in IE 11.
// See https://github.com/marko-js/marko/issues/796
curNode = curNode.correspondingUseElement || curNode;
// Search up the tree looking DOM events mapped to target
// component methods
var propName = 'on' + eventType;