View Full Version : Backspace key on masked textfields doesnt work on iPhone/iOs

13 Apr 2011, 12:32 AM
With ExtJS 3.3.2 on a iPhone with iOs 3.1.3, the backspace key does not work on my textfield with vtype='ean' with the code below.

Ext.apply(Ext.form.VTypes, {
eanText: 'Type de 7 numbers of your cardnumber after 123456.',
eanMask: /[0-9]/,
eanRe: /^[0-9]{7}$/,
ean: function(v) {
return this.eanRe.test(v);

It's the eanMask line that prevents the backspace key. (Without the line the backspace key works)

Is the backspace considered to be a regular key on ExtJS 3.3.2 on iOs 3.1.3 which does not fall within the regexp range 0-9?
I would like to have the mask and allow the backspace key. What's the best approach here?