Prevent Tab-Out of modal

2 posts, 0 answers
  1. Samuel Davis
    Samuel Davis avatar
    12 posts
    Member since:
    Feb 2010

    Posted 27 Jul 2010 Link to this post

    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?
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 28 Jul 2010 Link to this post

    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
Back to Top