                     textToInsert = textToInsert.substr(0, maxChars - length1);
             }
 
-            if (displayAsPassword)
+            if (_displayAsPassword)
             {
                 _text = splice(_text, insertTextOperation.absoluteStart,
                                insertTextOperation.absoluteEnd, textToInsert);

        newEvent.operation = event.operation;
        dispatchEvent(newEvent);
    }
}

}

            // Note: Must process restrict first, then maxChars,
            // then displayAsPassword last.
            
            if (_restrict != null)
            {
                textToInsert = StringUtil.restrict(textToInsert, restrict);
                if (textToInsert.length == 0)
