Menu close event problem

4 posts, 1 answers
  1. ramesh
    ramesh avatar
    7 posts
    Member since:
    Aug 2013

    Posted 21 Dec 2013 Link to this post

    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.
  2. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 23 Dec 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. ramesh
    ramesh avatar
    7 posts
    Member since:
    Aug 2013

    Posted 23 Dec 2013 Link to this post

    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.

  5. Answer
    ramesh
    ramesh avatar
    7 posts
    Member since:
    Aug 2013

    Posted 23 Dec 2013 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready