Tab key in modal form popup

Hi,
I have a form with some button into a modal popup, when I press the TAB key the focus goes on the disabled form in the background outside the popup. How may I avoid this behavoir?
Thanks

Hi,

The modality for ui.window is mostly a design, so it’s a normal behavior. The most simple solution is to forbid the related action using keydown event:

http://webix.com/snippet/7abd8b64

But if you need to use a tab navigation in the window, here’s a more complex solution:

https://webix.com/snippet/84f13d75

Yes, too complicated

I found a very basic solution by triggering the onKeyPress event on the first and the last control in the form embedded in the popup.

onKeyPress: function(code, event) {
if (code == 9) {
  $$('first').focus();
  event.preventDefault();
}

}

onKeyPress: function(code, event) {
if (code == 9 && event.shiftKey == true) {
  $$('last').focus();
  event.preventDefault();
}

}

thank you