PDA

View Full Version : IE-Can't move to a new line in the TextArea if it is configured with maskRe property



Bohdan
13 Sep 2013, 7:15 AM
In Internet Explorer (tested on IE8 and IE10) I can't move to a new line in the TextArea if it is configured with some maskRe property.
For exapmple:

Ext.create('Ext.form.FormPanel', {
title : 'Sample TextArea',
width : 400,
bodyPadding: 10,
renderTo : Ext.getBody(),
items: [{
xtype : 'textareafield',
grow : true,
name : 'message',
fieldLabel: 'Message',
maskRe : new RegExp ("[0-9]")
}]
});
http://jsfiddle.net/uZB8P/
In FireFox it works fine

Gary Schlosberg
13 Sep 2013, 9:41 AM
Guessing this is a difference in the way browsers handle regular expression. It worked in Firefox for me too, but I was unable to create newlines in Chrome either, until I changed the config to:



maskRe : new RegExp ("[0-1\r]")


Hopefully that helps.