Reputation: 963
I have Ext.Editor
and have some onClick event that's begin to edit it, I need select all text in editor before edit
var elem = new Ext.Editor(new Ext.form.TextField({
allowBlank : false,
blankText : 'required',
maxLength : 22,
width : 111
}), {
alignment : 'tl-tl',
completeOnEnter : true,
parentEl : selNode
});
elem.startEdit(selNode.ui.getAnchor(), selNode.text);
tried elem.focus(true,10);
and many other ... not working
Upvotes: 0
Views: 1249
Reputation: 30082
You can use the selectText method:
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.form.TextField-method-selectText
Upvotes: 1