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

Menu close event problem

3 Answers 85 Views
Menu
This is a migrated thread and some comments may be shown as answers.
ramesh
Top achievements
Rank 1
ramesh asked on 21 Dec 2013, 03:46 PM
Hi,

var menu = $("#menu").kendoMenu({openOnClick: true }).data("kendoMenu");
menu.close("#Item1");

I am using above method to close the dropdown, it is working fine. But after closing also if i mouse over on the menu the dropdown gets opened.
My requirement is to open the dropdown only on click not on mouse over. could any body help me.

Regards,
Ramesh V.

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Dec 2013, 08:18 AM
Hi Ramesh,

The Menu has a configuration setting for the desired behavior:

http://docs.kendoui.com/api/web/menu#configuration-openOnClick


Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
ramesh
Top achievements
Rank 1
answered on 23 Dec 2013, 09:24 AM
Hi Dimo,

I already applied that configuration, 

var menu = $("#menu").kendoMenu({
                                  openOnClick: true
                          }).data("kendoMenu");
menu.close("#Item1");

because of this, when I click its open and when I use menu.close() to close the drop-down, and again if I hover it gets opened.
I have made a example in below link, I made click event on iframe to close the drop-down when clicked on iframe.

http://jsbin.com/AbAgeDO/26/edit


Thanks and Regards
Ramesh V.

0
Accepted
Dimo
Telerik team
answered on 23 Dec 2013, 11:44 AM
Hello Ramesh,

You are right, sorry about the misunderstanding. The issue is now fixed and changes will take effect in the next internal and official builds. You can easily workaround it like this:

menu.close("#Item1");
menu.clicked = false;

In case you have nested Menu groups, the clicked field should be set to false only when you are closing a root item.

I have updated your Telerik points.

Regards,
Dimo
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
ramesh
Top achievements
Rank 1
Answers by
Dimo
Telerik team
ramesh
Top achievements
Rank 1
Share this question
or