[FIXED] [#759] [2.5.4] PasswordMask: HideAll

  1. #1

    [FIXED] [#759] [2.5.4] PasswordMask: HideAll

    Look at the following example Form => TextField => Advanced_Password_Mask. The PasswordMask is set to Mode="HideAll". If you type a single letter in the password field the following javascript error occurs:

    Uncaught TypeError: Cannot read property 'length' of undefined
    Last edited by Daniil; Mar 17, 2015 at 2:22 PM. Reason: [FIXED] [#759] [2.5.4]
  2. #2
    Hi Chris,

    Thank you for the report! Created an Issue.
    https://github.com/extnet/Ext.NET/issues/759

    Once you confirm it works for you, I'll commit to SVN.

    Fix
    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);
        }
    });
  3. #3
    Looks great. Looking at the GitHub documentation, this is also a bug in 2.x. Please close the thread.
    Last edited by cwolcott; Mar 17, 2015 at 1:24 PM.
  4. #4
    Thank you for confirming! Fixed in the revision 6403 (branches/2).

    Initially, I labeled the GitHub issue with 3.x by mistake. It is not reproducible with 3.x. Thank you for the note!

Similar Threads

  1. Plugin PasswordMask - not found,
    By asics167 in forum 2.x Help
    Replies: 2
    Last Post: Dec 12, 2013, 5:05 AM
  2. Replies: 2
    Last Post: Dec 10, 2013, 9:24 AM
  3. Plugin PasswordMask - not found?
    By asics167 in forum 2.x Help
    Replies: 1
    Last Post: Dec 09, 2013, 10:59 AM
  4. Replies: 7
    Last Post: Sep 18, 2013, 1:18 PM
  5. [CLOSED] PasswordMask information
    By CarWise in forum 2.x Premium Help
    Replies: 5
    Last Post: Sep 12, 2013, 11:32 AM

Posting Permissions