Results 1 to 5 of 5

Thread: Keyboard word "return" not "search" for IOS xtype: searchfield component.

  1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default Unanswered: Keyboard word "return" not "search" for IOS xtype: searchfield component.

    Dear:

    We use st2.0 for our project and encounter one problem for it. When we use the "xtype: searchfield" as a seach field in UI for users to input the string for searching. In Andriod , the keyboard dumped will set the button named "search". However, In IOS6, the keyboard dumped will use the button named "return" not "search" same as Andriod. Please tell me how to change the button name to "search" instead of "return" in IOS platform. I want to set "search" button on keyborad in the searchfield for these platforms.Thank u for your assistant.

    1.png

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,421
    Answers
    3900
    Vote Rating
    1271
      0  

    Default

    The searchfield must be within a form. If not then iOS will not have Search there. It's due to the <form> tag needing to be there.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Code:
    {
                      id: 'frontpage_fpsearchfield',
                         xtype: 'searchfield',
                         placeHolder: 'Please input the project name',
                         width: '95%',
                         height: 35
                     }

  4. #4
    Sencha User
    Join Date
    Oct 2008
    Location
    Hyderabad, India
    Posts
    1
    Vote Rating
    0
      0  

    Default Any other workaround when searchfield is outside form.

    This limitation is weird one but I'm sure there's a strong reason Sencha devs decided to design it that way. I just need to search via Ajax outside form and since I cannot have 2 forms (and I don't want to have). Is there any workaround, a function I can override for my specific use case.

  5. #5
    Sencha User
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    89
    Answers
    5
    Vote Rating
    7
      0  

    Default

    Have you considered trying something like this:

    Code:
    this.on{(
        focus: function() {
            field.wrap({
                tag: 'form'
            });
        },
        blur : function() {
            field.unwrap();
        },
        scope: this,
        order: 'before'
    });

Tags for this Thread

Posting Permissions

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