or ). In Safari the event goes to the text node itself. This causes the dojo.html.getEventTarget() function to give different results in the different browsers.
I have a simple HTML file that displays this behavior, but I can't figure out how to attach it. Please email me if you want it, breischl@zx440.com or brianr@newsgator.com
In order to equalize the results, getEventTarget() should check the nodeType of event.srcElement. If the nodeType == 3, then event.srcElement.parentNode should be returned instead. Example code:
{{{
function getEventTargetSafariSafe(evt){
if(!evt) { evt = window.event || {} };
if(evt.srcElement) {
return (evt.srcElement.nodeType == 3 ? evt.srcElement.parentNode : evt.srcElement);
} else if(evt.target) {
return evt.target;
}
return null;
}
}}}",defect,closed,high,,General,0.2,fixed,getEventTarget safari,,,