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

Window is not preventing access to the form it covers

1 Answer 36 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 13 Oct 2014, 11:25 PM
I am using a KendoUI window to popup a search dialog.  If the user tabs through the search criteria fields, when tabbing off the last form item, they end up in the form that is being covered by the overlay and can interact with the form in the background.  Mouse clicks are prevented but pressing tab seems to not be limited in scope to only controls on the window.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 14 Oct 2014, 11:26 AM
Hi Robert,

The desired behavior can be achieved with some custom coding that depends on the HTML markup inside the Window. You can use the focus, blur and/or keydown events of suitable elements on the page, as well as the document's activeElement field.

https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement

The keyCode of the TAB key is 9.

Basically, you need to detect when the focus is moved to a form field or hyperlink outside the Window popup and get it back inside the popup.

There are third-party popup widgets, which provide "true" modality out-of-the-box and access to elements outside the popup is disabled, however, in some scenarios such behavior is too intrusive and has undesired side effects.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Window
Asked by
Rob
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or