[1.0] Set focus textfield clientside kind of broken

  1. #1

    [1.0] Set focus textfield clientside kind of broken

    Hi

    I have a construct like this in my page

    <ext:ResourceManager 
        ID="resourceManager" 
        runat="server" 
        AjaxViewStateMode="Enabled" 
        Theme="Gray">
        <Listeners>
            <DocumentReady Handler="
                if (#{txtFilter} != null) {
                    #{txtFilter}.focus();
                    }  
                " /> 
        </Listeners>
    </ext:ResourceManager>
    This sets focus to a field located in the topbar of my gridPanel

    There is also a SplitButton with type set to ButtonType.Submit to the right of the textfield
    I need to click in the textfield before the form submit is fired otherwise pressing Enter will set focus to the splitbutton and the list is dropped down

    This is working in my 8.2 version

    [EDIT:] And my 1.0 upgrade is working in Chrome 8, FF 3.5 but not in IE 8
    Seems to be working in IE6

    rgds /Peter
    Last edited by plykkegaard; Jan 21, 2011 at 6:35 AM.
  2. #2
    Hi,

    Under the delay can be required
    <DocumentReady Handler="
      (function(){
                if (#{txtFilter} != null) {
                    #{txtFilter}.focus();
                    } }).defer(100); 
                " />
    Also, there are two properties for component: AutoFocus and AutoFocusDelay
  3. #3
    Focus is set to the textfield and I can type in the textfield without problems
    Form submit is not working in IE8

    I will try your suggestions

    Thanks /Peter
  4. #4
    Solved by adding "EnableKeyEvents = false;" to the TextField "txtFilter"

    rgds /Peter

Similar Threads

  1. [CLOSED] Focus TextField after Load
    By macap in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 22, 2010, 8:40 AM
  2. [CLOSED] How to focus TextField in Window?
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 14, 2010, 8:18 AM
  3. Focus on Textfield
    By hans4 in forum 1.x Help
    Replies: 2
    Last Post: Jul 02, 2009, 9:08 PM
  4. [CLOSED] Focus on textfield inside a tab
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 10, 2008, 1:32 PM
  5. Replies: 4
    Last Post: Jul 05, 2008, 2:14 AM

Tags for this Thread

Posting Permissions