Selection of node on right click with contextmenu

In DHXtree v1.6 , the node is not get selected when using context menu on right click. How to achieve this and add this functionality.

This is default behavior, you can force node selection by next code modification
dhtmlxtree.js , line 169
    dhtmlXTreeObject.prototype._doContClick=function(ev){
    …
    var obj=el.parentObject;
    obj.treeNod._selectItem(obj); //  <<this line added