简体   繁体   English

Kendo UI菜单open()close()在隐藏的父级中不起作用

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

I've made an example: http://dojo.telerik.com/IyAFA 我举了一个例子: 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; 我想问题是如果kendo菜单的父项具有样式display:none;则open()和close()函数不起作用display:none; . Anyone knows a workaround or a solution for this problem? 任何人都知道解决此问题的方法或解决方案吗?

I found some workaround: 我找到了一些解决方法:
Before call .close() on kendo menu, the following line should be added: .close()菜单上调用.close()之前,应添加以下行:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM