mihkov mihkov - 4 months ago 32
Javascript Question

Kendo UI menu open() close() not working in hidden parent

I've made an example: http://dojo.telerik.com/IyAFA

I have a sample menu and I want to close it in some events.
To test the example first drag over "Hover me" button (menu should be closed). Then click "Show Menu" button to see how it looks like.

I guess the problems is open() and close() function are not working if the parent of the kendo menu is with style

display:none;
. Anyone knows a workaround or a solution for this problem?

Answer

I found some workaround:
Before call .close() on kendo menu, the following line should be added:

  $('.k-animation-container').css('display','none');

http://dojo.telerik.com/IyAFA/6