View Full Version : IE and stepping across textfields

5 Jul 2011, 2:03 AM
My problem:
I' ve created Ext.grid.EditorGridPanel with any textfields.
In FF values are selected, if users stepping with enter key. In IE not.
This is a part of this grid:

chckTxt= new Ext.form.TextArea({
header: '<?=tooltHeader('geprüfte Summe')?>',
width: 98,
sortable: <?=$sortable?>,
renderer: function(v,p,r){
return '<span style="float:right;" ext:qtip="<? if($isLose){?>Gesamtsumme dieser Vergabe:<br />' + r.data.smCh + ' €<br />(geprüft)<?} else {?>Eingabe der geprüften Summe dieses Loses<?}?>">' + formatZahl(v,2,2) + ' €</span>';
editor: new Ext.form.NumberField({
editable: true,
allowBlank: true,
triggerAction: 'all',
typeAhead: true,
defaults:{hideMode:'offsets'} ,
/* additionals tests
listeners: { 'focus' : function(v,p) {if(v.el.getValue() == 0) {v.setValue('')}},
show:function(v,p){if(v.el.getValue() == 0) {v.setValue('');}else {
obj = fastGrid.getSelectionModel().getSelections();
var txtf=document.getElementById('schIE');

if (Ext.isIE) {
var txtRange = txtf.createTextRange();
txtRange.moveStart( "character", txtf.value.length);
txtRange.moveEnd( "character", 0 );
} }}}
})}) ....How can I persuade IE to select values at stepping with enter key?

Sorry. My English is obvious not perfect!

thx for helping!

Edit: this video will explain this problem -

5 Jul 2011, 4:10 PM
Trying to get my head around your problem.

How are you making it move to the next row when the user presses Enter? I don't see any code to do that.
Why are you using a TextArea as a column definition? I suppose it will work but by luck more than by design.
The options editable, triggerAction, typeAhead, defaults and store are not valid on a numberfield.
Have you considered the beforeedit event on the editorgrid? I found that something a bit like this worked for me, using Tab to jump between fields:

beforeedit: function() {
numberField.selectText.defer(50, numberField);

Not sure exactly why but it seemed a delay was needed to get the selection to take.

5 Jul 2011, 10:03 PM
@1st: there isn' t any special key listener. The using of enter key is standart, I think.
@2nd: I changed to a textfield. It was a c/p - effect

@4th: perfect code.
Thank you for your help

7 Jul 2011, 11:44 AM
@2nd: I changed to a textfield. It was a c/p - effect

It shouldn't be a textfield either, it's just a column definition. It should look a bit like this:

chckTxt= {
header: ...