How to show the submenu of the selected menu item when enter key pressed.

I am able to navigate through the menu items by pressing up and right arrows. When I choose the menu item which has submenu and pressed enter key, I am unable to show the submenu.

below is the code I tried :

webix.ui({
              view: "contextmenu",
              id: "dtContextMenu",
              navigation: true,
              select: true,
                hotkey:"enter",
              css: "webix-contextmenu",
              template: "#value#",
              master: $$("myGrid")
            });
          }


$$('dtContextMenu').attachEvent("onAfterLoad", function () {
              webix.UIManager.addHotKey("enter",     itemContextMenu.Controller.testEnter, $$('dtContextMenu'));
}

 testEnter: function()
        {
            $$("dtContextMenu").hide();
            webix.UIManager.removeHotKey("enter", null, $$("dtContextMenu"));
            webix.message("Inside Test Enter Method");
            var view = $$("dtContextMenu");
            if (view.name == "contextmenu")
            var id = view.getSelectedId();
            var submenu = view.getSubMenu(id);
            if(submenu)
            {
                //code to show submenu for selected Menu item

            }
            
        },

Not sure, but maybe something like

submenu.show( this.getItemNode(id) );

@maksim : This line of code is not working and it throws an exception saying
" TypeError: undefined is not a function"

@maksim: I am able to show the submenu using this line of code

submenu.show( );

but the problem I am facing is :

  1. The submenu is not displaying beside the Main menu where its shown… instead of that it showing at the point (x=0 , y =0)
  2. submenu up and down arrow navigation is not working and even when I choose mouse click on the submenu item its action is not performed.

Any suggestion will be really appreciated…

Thank you…

You need to provide some value as parameter of the show method. It can be an event object, or an HTML object. In my previous snippet, the html element of the active menu item was used as parameter.