[FIXED] [#775] [3.2.0] PasswordMask HideAll issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [FIXED] [#775] [3.2.0] PasswordMask HideAll issue

    There is a problem with PasswordMask HideAll not capturing the password typed in.

    1. Enter "aaaa" and press the login button.
    2. Select the PasswordField again. This will highlight the old password. Just start typing "bbbb" and press the login button.
    3. Select the PasswordField again. This will highlight the old password. First press Backspace or Delete then type "cccc" and press the login button.


    Step 1 will show you what you type - aaaa
    Step 2 will show you what you type - abbb (The first character is not replaced).
    Step 3 will show you what you type - cccc

    There is current an override of PasswordMask to fix a javascript error with HideAll - Thread 56771
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html>
    <html>
    <script runat="server">
    
    </script>
    <head runat="server">
        <title></title>
        <style type="text/css">
        </style>
        <script type="text/javascript">
    
            //Thread 56771 - March 17, 2015 - PasswordMask issue
            // If we set the mode to HideAll a javascript error occurs when
            // typing the first character.
            Ext.net.PasswordMask.override({
                onKeyPress: function () {
                    var me = this,
                    oldValue = me.cmp.lastValue || "";
    
                    if (me.mode != "hideall") {
                        return;
                    }
    
                    setTimeout(function () {
                        var newValue = me.cmp.getValue();
                        if (newValue.length < oldValue.length) {
                            me.onDelete(me.getCaretRange(), oldValue.length - newValue.length);
                        } else {
                            me.maskChars(newValue);
                        }
                        me._maskAll();
                    }, 0);
                }
            })
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Panel runat="server" Title="Password Mask Issue" Margin="5" Height="200" Width="400" BodyPadding="10" UI="Danger">
            <Items>
                <ext:TextField ID="Password" runat="server" FieldLabel="Password" ClientIDMode="Static" SelectOnFocus="true">
                    <Plugins>
                        <ext:PasswordMask runat="server" Mode="HideAll" Pattern="z" AllowAnyChars="true" />
                    </Plugins>
                </ext:TextField>
            </Items>
            <Buttons>
                <ext:Button runat="server" Text="Login" Handler="Ext.Msg.alert('Password ...', App.Password.getPassword());" />
            </Buttons>
        </ext:Panel>
    </body>
    </html>
    Last edited by Daniil; Apr 03, 2015 at 8:05 AM. Reason: [FIXED] [3.2.0]

Similar Threads

  1. Replies: 3
    Last Post: Mar 17, 2015, 2:21 PM
  2. Plugin PasswordMask - not found,
    By asics167 in forum 2.x Help
    Replies: 2
    Last Post: Dec 12, 2013, 5:05 AM
  3. Plugin PasswordMask - not found?
    By asics167 in forum 2.x Help
    Replies: 1
    Last Post: Dec 09, 2013, 10:59 AM
  4. [CLOSED] PasswordMask. Disable all validation. Only use Mac style :)
    By CarWise in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 18, 2013, 1:18 PM
  5. [CLOSED] PasswordMask information
    By CarWise in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Sep 12, 2013, 11:32 AM

Posting Permissions