This is a migrated thread and some comments may be shown as answers.

When binding a context menu to multiple targets, the event.target node is not always correct

1 Answer 383 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 2
Jacob asked on 07 Jul 2015, 04:16 PM

Hi,

We are working with the Kendo Context Menu. The problem we are dealing with happens when we are trying to bind one context menu to multiple targets (each row in a grid has a button, and each of those buttons should open the same menu). 

In our click listener, it seems that the event.target element is not always the correct target that was clicked on. 

A simple example is here: http://dojo.telerik.com/aYiTi/2

Are we doing something wrong? Is there a more reliable way to get the element that was clicked on?

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 09 Jul 2015, 11:35 AM
Hello Jacob,

Indeed, this behavior is not expected when using the open event, so I have logged a GitHub issue that you can track. As a workaround, you can either subscribe to the activate event or use the e.event.target argument.
As a small sign of our appreciation I have updated your Telerik points.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Menu
Asked by
Jacob
Top achievements
Rank 2
Answers by
Alexander Popov
Telerik team
Share this question
or