dhtmlxfolders: onclick and ondblclick

I just sent a question about onclick and ondblclick. I solved my problem by adding a delay to the onclick-event (code below).









dhtmlxFolders.prototype._onclickHandler=function(e)

{

        var id=this._trackParent(e);

        if (!id)

            return this.stopEdit();



         this.stopEdit();

        

        if ((e.ctrlKey)||(e.shiftKey)|| this.getItem(id).data.selected || (!this.matchSelected(function(id,ind){

                this.unselectAll();

                //if ((this._set.editable)&&(((new Date()).valueOf()-this._last_click_time) > 500))

                //    this.editItem(id);

        },id))){

            this.selectItem(id,e.ctrlKey,e.shiftKey);

        }

        

this._last_click_time=(new Date()).valueOf();









// @@flamsens

var self = this;

window.setTimeout( function() { eval(“self.callEvent(‘onclick’,[id]);”) }, 250);









// this.callEvent(“onclick”,[id]);

return true;

}


Yes, this is only correct solution ( as far as I can see )



I suggested some similar one in original thread
dhtmlx.com/docs/products/kb/inde … ent&q=3295