Unable to Click Dataview Containing an SVG Image

I am using the dataview to render some buttons dynamically with the actions are triggered by the “onbeforeselect” event. I have discovered that the event will not be triggered if the dataview contains an SVG image and throws the following error:

Uncaught TypeError: Object #<SVGAnimatedString> has no method 'split'
var starSVG = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px"'
+ '	 height="32px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">'
+ '<g id="Layer_1">'
+ '</g>'
+ '<g id="star">'
+ '	<g>'
+ '		<polygon class="svgIcon" points="22.137,19.625 32,12 20,12 16,0 12,12 0,12 9.875,19.594 6,32 16.016,24.32 26.008,32 		'
+ '			"/>'
+ '	</g>'
+ '</g>'
+ '</svg>';

var applicationViews = [
	{ buttonContent: "<div><div class='homepageImage'>" + starSVG + "</div><div class='homepageText'>Button 1</div></div>" }
];

{ view: "dataview", id: "buttons", datatype: "json", data: applicationViews,
    type: { height: "auto",
        width: "auto",
        padding: "10px 10px 5px 10px",
        template: "<button class='homepageButton'>#buttonContent#</button>"
        }, select: true
}
$$("buttons").attachEvent("onbeforeselect", function() { dhx.alert("button pressed"); }));

Thanks,
James

Hello,

could you attach the sample that reproduces the problem ?

Here is a patch of the fix

1083c1083
< 		if (element && element.touchable && (!target.className || target.className.indexOf("dhx_view")!==0)){
---
> 		if (element && element.touchable && ((!target.className || typeof (target.className) !== "string") || target.className.indexOf("dhx_view")!==0)){
1748c1748
< 			if (css){		//check if pre-defined reaction for element's css name exists
---
> 			if (css && typeof(css) == "string" ){		//check if pre-defined reaction for element's css name exists