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

Prevent Tab-Out of modal

1 Answer 134 Views
Window
This is a migrated thread and some comments may be shown as answers.
Samuel Davis
Top achievements
Rank 1
Samuel Davis asked on 27 Jul 2010, 03:38 PM
The modal window is preventing users from clicking outside of the window but it is not preventing users from using tab and focusing on controls from the parent page.  Is there a way to prevent this?

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 28 Jul 2010, 09:38 AM
Hello Samuel Davis,

We are aware of this behavior. When you click on the page that is loaded in the RadWindow you set the focus on the IFRAME that holds the content page. That is why you are able to tab away from the IFRAME. Please note that this behavior is not directly related to the RadWindow control, but to the way browsers treat content in IFRAMEs.

In such cases we suggest to create your own JavaScript function that will disable the shortcuts on the page that is loaded in the IFRAME.
e.g..

<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">
    function DisableShortcuts()
    {
        if (event.keyCode==9)
        {
            return false;
        }
    }
    </script>
</head>
<body onkeydown="return DisableShortcuts();">
    <form id="form1" runat="server">
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    </form>
</body>
</html>


Best wishes,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Samuel Davis
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or