Close popup Window on Enter Key

I have had look up all over this forum but couldn’t find any solution. The question:

I have a popup window like:

popup =webix.ui({
view: “window”,
modal: true,
position: “center”,
id: “addNewTextWindow”,
width: 500,
height: 300,
…});

In the body I have a form which should submit by pressing the enter key.

maybe a event with addhotkey?

Michael

You can attach a handler to “enter” key pressing with the help of an addHotKey method of the UIManager module:

webix.UIManager.addHotKey("enter", function(popup){
   //submit form data 
    popup.hide();
}, $$("addNewTextWindow"));

Thank you, Helga.