toolbar.objPull[].obj.onclick returns null after version 5.0

Hi.
i have used this code so far for cancelBubble to toolbar onclick event.

toolbar.objPull[toolbar.idPrefix+id].obj.onclick.arguments[0].cancelBubble = true;

And it was working for versions before dhtmlx suite 5.0
But now toolbar.objPull[toolbar.idPrefix+id].obj.onclick returns null.
And i can’t find the event for cancelBubble.
Is it a bug or how can i find the onclick event?
Thanks

Hello.
Could you please provide us complete demo including all corresponding js/css files?
Here is a small guide how to make a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

It’s not related with my code.
The result is same for version 5.0.2.
It works in version 4.0
If you try the script toolbar.objPull[toolbar.idPrefix+id].obj.onclick.arguments[0].cancelBubble = true; ,
you will get the same error.

Can you share a bit more details please, why do you need to cancelBubble on toolbar’s button in the first place?

Hi.
Thanks for your interest.
This topic is the why i want to cancelBubble for toolbar button.

viewtopic.php?f=14&t=9526&hilit=toolbar+editcell

dhxSupport says:
‘If you are adding row by pressing on some button you should cancel bubble for “onclick” event:
addRow’

Alex V. Tech Support says:
When you click somewhere on the page, the grid loses focus. Bubbling must be canceled to prevent that.

The alternative solution for the same issue will be to use code like next

<button onclick="setTimeout(function(){ addRow() },1);">addRow</button>'

It ensures that row will be added only after current click event is fully processed

i have solved the problem by converting

mygrid.editCell();

to

window.setTimeout(function(){
mygrid.editCell();
},1);

on onclick event of the toolbar.

Thank you everybody for help.