PDA

View Full Version : [OPEN-1079] In Opera Tab button does not switch focus on some filelds



minspect
27 Jun 2010, 9:57 PM
I have noticed that Tab button is not working correctly with some form fields in Opera.

http://www.sencha.com/deploy/dev/examples/form/dynamic.html
Find an email field, click on it, and press Tab. Nothing happens...

Same thing with numeric fields.

I'm using Opera 10.6 beta on Windows Vista.

Condor
27 Jun 2010, 10:16 PM
Not only Tab, but most special keys like Backspace, Left and Right also don't work.

Opera 10 fires keypress events for special keys, so you need:

Ext.override(Ext.form.TextField, {
filterKeys : function(e){
if(e.ctrlKey){
return;
}
var k = e.getKey();
if((Ext.isGecko || Ext.isOpera) && (e.isNavKeyPress() || k == e.BACKSPACE || (k == e.DELETE && e.button == -1))){
return;
}
var cc = String.fromCharCode(e.getCharCode());
if(!Ext.isGecko && e.isSpecialKey() && !cc){
return;
}
if(!this.maskRe.test(cc)){
e.stopEvent();
}
}
});