mom_pece
4 Nov 2011, 3:15 AM
I have a few issues trying to set focus on a text field inside a panel.
I am currently doing:
this.getForm().on({
scope: this,
'show': function (el, opt) {
this.getBoxCodeInput().focus();
}
});
where getForm() returns the view (a Panel) and this.getBoxCodeInput() returns the text field. The field does not get focused.
On another instance I need to focus another field when one field has been completed (carriage return pressed or go button on ipad)
this.control({
'#codeInput': {
action: this.barcodeInput
},
});
.....
barcodeInput: function(e, field) {
this.getLocationFrom().getInput().focus();
}
This seems to focus the other input (it flashes a carret whhen I try to move to another field) but the ipad virtual keyboard does not show up and the any key press (we use a barcode scanner) won;t fill in the field.
I am currently doing:
this.getForm().on({
scope: this,
'show': function (el, opt) {
this.getBoxCodeInput().focus();
}
});
where getForm() returns the view (a Panel) and this.getBoxCodeInput() returns the text field. The field does not get focused.
On another instance I need to focus another field when one field has been completed (carriage return pressed or go button on ipad)
this.control({
'#codeInput': {
action: this.barcodeInput
},
});
.....
barcodeInput: function(e, field) {
this.getLocationFrom().getInput().focus();
}
This seems to focus the other input (it flashes a carret whhen I try to move to another field) but the ipad virtual keyboard does not show up and the any key press (we use a barcode scanner) won;t fill in the field.