1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    19
    Vote Rating
    0
    lsadiki is on a distinguished road

      0  

    Default Unanswered: Keep focus on searchfield whil tab clear icon

    Unanswered: Keep focus on searchfield whil tab clear icon


    I have a search field and I want do write text and finish it with the iPhone keybard button DONE or ENTER. The ENTER button works with the action event but the DONE button can just be used with the blure event.

    Now I just use the bluer event for sending the search request but there are a problem:

    If I write something in my searchfield and want to clean it with the (X) button, so it lost the focus and the blur event starts over.

    What I want is, that I can send a search request by touching the ENTER and DONE button in iphone keyboard.

    How can I do that?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,724
    Answers
    3359
    Vote Rating
    752
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Browser behavior will blur the field if you tap off the actual field which you are technically doing with the clear icon.

    The issue is that blur fires before the tap on the clear icon
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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
    Feb 2012
    Posts
    2
    Vote Rating
    0
    frenkelor is on a distinguished road

      0  

    Default this is a bad work around but this is worked for me

    this is a bad work around but this is worked for me


    I have some workaround for this issue but this is not a "good" workaround.
    I'm using Sencha touch 2.1.
    The key is inside Sencha touch file "Default.js" in function "doBlurInput".

    this is the original implementation:

    Code:
        doBlurInput: function(e) {
            var target = e.target,
                focusedElement = this.focusedElement;
            if (focusedElement && !this.isInputRegex.test(target.tagName)) {
                delete this.focusedElement;
                focusedElement.blur();
            }
        },
    and this is my implementation

    Code:
        doBlurInput: function(e) {
            var target = e.target,
                focusedElement = this.focusedElement;
            if (focusedElement && !this.isInputRegex.test(target.tagName) && (target.className.toString().indexOf('x-clear-icon') < 0)) {
                delete this.focusedElement;
                focusedElement.blur();
            }
        },


    So basically they don't calling the blur event if this is an input element but they don't checking if this is the inputs' clear icon element and prevent the blur action again.

    the good part is that this workaround working.
    The Bad part is that i didn't succeed to overWrite Sencha Touch class "Ext.viewport.Default"
    so for now i'm overwriting the Default.js itself and if you wish to over write your clear-icon cls this is not generic solution.



    I think Sencha should handle this bug in their way

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar