cnq77f

Jan 05 2009

do not select existing text in text field when focus via tab key

Filed under: xn--cnq77f.com

  • When you CLICK into a textfield, if you want to select the existing text you might do something like this:

    fieldLabel: 'someLabel',
    name: 'someName',
    selectOnFocus: true,//select all of the existing text
    value: 'someValue'


    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).

    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.


  • does this happen in ie/fx too?


  • 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)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about do not select existing text in text field when focus via tab key , Please add it free.
    edit