-
13 Jul 2008 6:29 AM #1
do not select existing text in text field when focus via tab key
do not select existing text in text field when focus via tab key
When you CLICK into a textfield, if you want to select the existing text you might do something like this:
The above works fine when you CLICK into the field. I haven't dug into the source yet, but it looks like Ext probably just listens to the focus event and if that setting is true it deselects the text (for a brief moment I can see the contents get selected then deselect).PHP Code:fieldLabel: 'someLabel',
name: 'someName',
selectOnFocus: true,//select all of the existing text
value: 'someValue'
The problem: if you tab or shift+tab to gain focus it doesn't honor the selectOnFocus setting.
Not sure if that's my mis-use, a bug, or the intended behavior.MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
13 Jul 2008 10:07 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
does this happen in ie/fx too?

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
13 Jul 2008 6:23 PM #3
To reproduce problem in IE or firefox
- go here: http://extjs.com/deploy/dev/examples/form/dynamic.html
- In first field type in something.
- tab to next field
- Shift tab to go back to first field (for me it does select the existing content)
- Click on another field
- Now Click on the first field again (for me it does not select the existing content)
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow


Reply With Quote