Behavior of _onClickHandler function differs

The function on _onClickHandler defind in dhtmlxTabbar.js (version 2.0) behaves differently in Firefox 3.6 and Firefox 12.

On analyzing the function we observed the following :

if (_isIE){
var target = event.srcElement;
var target =;
if (document.body.onclick){ //document.body.onclick is undefined in Firefox 3.6
// whereas document.body.onclick is defined in Firefox 12

	if (_isIE){
	}else {
		var cl=document.createEvent("MouseEvents");
		cl.initEvent("click", true, true)

In firefox 3.6 (document.body.onclick) is undefined thus only the else part of condition (_isIE) gets called.

But in firefox 12 (document.body.onClick) is defined and thus both the body of :

Condition : if (document.body.onclick) and
Else part of condition : if (_isIE)

are executed. This causes the events to be called twice.

Is this behavior handled in dhtmlx version 3.0?
Is there any work around for this behavior ?

Thanks and Regards
Lakshaya Agnani


please try to use the latest (3.0) version in your app. If the problem persists, please attached the complete demo that reproduces the problem.