RadWindowManager breaking IE AutoComplete Password feature

3 posts, 1 answers
  1. James
    James avatar
    35 posts
    Member since:
    Apr 2010

    Posted 18 Oct 2011 Link to this post

    I noticed that when I added the RadWindowManager to my login page, the AutoComplete Password feature in IE stopped functioning.  Microsoft, in its infinite wisdom, setup this feature so that it only works when there are exactly two text input controls on the page.  When reviewing the generated html, it looks like when the RadWindowManager is added, another text input control is generated.

    Look for the line: <input title="Enter Value" onkeydown="return RadWindowprompt_detectenter('{0}', event, this);" type="text" class="rwDialogInput" value="{2}" />

    <div id="ctl00_windowManager" style="z-index:9500;display:none;">
        <!-- 2011.2.915.40 --><div id="ctl00_windowManager_alerttemplate" style="display:none;">
            <div class="rwDialogPopup radalert">            
                <div class="rwDialogText">
                {1}             
                </div>
                  
                <div>
                    <a  onclick="$find('{0}').close(true);"
                    class="rwPopupButton" href="javascript:void(0);">
                        <span class="rwOuterSpan">
                            <span class="rwInnerSpan">##LOC[OK]##</span>
                        </span>
                    </a>                
                </div>
            </div>
            </div><div id="ctl00_windowManager_prompttemplate" style="display:none;">
             <div class="rwDialogPopup radprompt">          
                    <div class="rwDialogText">
                    {1}             
                    </div>      
                    <div>
                        <script type="text/javascript">
                        function RadWindowprompt_detectenter(id, ev, input)
                        {                           
                            if (!ev) ev = window.event;                
                            if (ev.keyCode == 13)
                            {                                                                   
                                var but = input.parentNode.parentNode.getElementsByTagName("A")[0];                         
                                if (but)
                                {                           
                                    if (but.click) but.click();
                                    else if (but.onclick)
                                    {
                                        but.focus(); var click = but.onclick; but.onclick = null; if (click) click.call(but);                            
                                    }
                                }
                               return false;
                            
                            else return true;
                        }    
                        </script>
                        <input title="Enter Value" onkeydown="return RadWindowprompt_detectenter('{0}', event, this);" type="text"  class="rwDialogInput" value="{2}" />
                    </div>
                    <div>
                        <a onclick="$find('{0}').close(this.parentNode.parentNode.getElementsByTagName('input')[0].value);"             
                            class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
                        <a onclick="$find('{0}').close(null);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
                    </div>
                </div>                     
            </div><div id="ctl00_windowManager_confirmtemplate" style="display:none;">
            <div class="rwDialogPopup radconfirm">          
                <div class="rwDialogText">
                {1}             
                </div>                      
                <div>
                    <a onclick="$find('{0}').close(true);"  class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
                    <a onclick="$find('{0}').close(false);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
                </div>
            </div>      
            </div><input id="ctl00_windowManager_ClientState" name="ctl00_windowManager_ClientState" type="hidden" />
    </div>

    As much as I dislike the notion of users using the AutoComplete for passwords from a security stand point, it is a requirement that this page support it.  Is there a simple work around so I can keep the RadWindowManager on this page?

    I am using IE8 and version 2011.2.915 of the Telerik controls.  Thanks.
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    4569 posts

    Posted 20 Oct 2011 Link to this post

    Hi James,

    This is the RadPrompt's template. When a RadWindowManager is present on the page it needs to render these templates as well. The first solution that comes to mind is to avoid the manager - if this is a login page, then it would have simple functionality and perhaps it could do without a manager.

    If this is not an option you can modify the templates as explained in this help article: http://www.telerik.com/help/aspnet-ajax/window-dialogs-changing-dialog-templates.html. You can simply remove the input from the <PromptTemplate>. Please note that this would result in a modified version of radprompt being present on your page and you would not be able to use it as a prompt. I hope you do not, so this modification will not result in functionality issues.


    Best wishes,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. James
    James avatar
    35 posts
    Member since:
    Apr 2010

    Posted 20 Oct 2011 Link to this post

    Thanks Marin.

    It was convenient to use the WindowManager in this scenario since it is defined on a master page that is also used by other pages.  Luckily, we don't use the prompt template at all so I was easily able to override it with an empty div.  This should solve our problem, thanks for the quick response!

Back to Top