Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: How to set focus for textfield

  1. #11
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,383
    Vote Rating
    858
      0  

    Default

    blur is the opposite of focus.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  2. #12
    Sencha User WallTearer's Avatar
    Join Date
    Jan 2012
    Location
    Kiev, Ukraine
    Posts
    19
    Vote Rating
    0
      0  

    Default

    Do you guys have any luck of making this work on the iPhone?
    I've tried to create textfields in different ways as you were showing here, but still focus() is working only when I test in Chrome.
    The code for setting focus is:
    Code:
    App.views.form.getComponent(nodeId).fieldEl.dom.focus();
    Btw, in the iPhone Safari debug log I can see that the field was successfully found, but method doesn't work in some reason.
    You're a true obsessive programmer, if your answers to the questions are totally correct and totally useless at the same time.

  3. #13
    Sencha User
    Join Date
    Jul 2012
    Location
    Pune, India
    Posts
    7
    Vote Rating
    0
      0  

    Default Set focus

    for hiding the keyboard use:
    window.blur();
    or
    document.activeElement.blur();


    but I am having problem with showing keyboard when view changes. Setting the focus to textfield works only in chrome not in the device.
    field.fieldEl.dom.focus();

  4. #14
    Sencha User
    Join Date
    Jul 2012
    Location
    Pune, India
    Posts
    7
    Vote Rating
    0
      0  

    Default

    yes same here. its works in chrome perfectly not in the iPhone

  5. #15
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default why?


  6. #16
    Sencha User
    Join Date
    Oct 2012
    Posts
    14
    Vote Rating
    0
      0  

    Default fieldEl does not exist

    I am trying to set the focus , like in the example , but the far I can go is .element
    not fieldEl , either el .

    how can I get fieldEl from element ?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Textfield sometimes not getting focus
    By yanfa01 in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 6 May 2010, 12:23 AM
  2. set focus on a textfield
    By Stephan123 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 2 Nov 2009, 8:30 AM
  3. Set focus on a textfield
    By dinosauro in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 10 Sep 2008, 5:58 PM
  4. set focus on textfield doesn't work
    By Ricardo72 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 31 Jan 2008, 3:39 AM
  5. Set Focus for textfield ....??
    By xucloudy in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 23 Dec 2007, 4:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •