1. #1
    Sencha User steffenbrem's Avatar
    Join Date
    Mar 2012
    Posts
    36
    Vote Rating
    2
    steffenbrem is on a distinguished road

      1  

    Default HOW TO prevent itemtap in list to fire more then once!

    HOW TO prevent itemtap in list to fire more then once!


    Hello guys

    I currently had this problem that when I tapped quickly two times on a list item, the itemtap was fired two times too! This was very annoying, but I've found a nice solid way to prevent this.

    We simply need to set a custom property in our controller, where we say if we can execute the tap event or not.

    NOTE: This only works if you work within a navigationView.

    Code sample:
    Code:
    config: {
        refs: {
            myPage: 'mypage',
        },
        control: {
            'mypagelist': {
                itemtap: 'showPage'
    
            },
            'mypage': {
                back: function() {
                    this.pushDisabled = false;
                }
            }
        }
    },
    
    showPage: function() {
        if (this.pushDisabled) { return; }
        this.pushDisabled  = true;
    }
    I hope this helps someone!


    Steffen

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,791
    Vote Rating
    833
    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


    Try using itemsingletap instead of itemtap
    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 steffenbrem's Avatar
    Join Date
    Mar 2012
    Posts
    36
    Vote Rating
    2
    steffenbrem is on a distinguished road

      0  

    Default


    Already used singleitemtap. This event is slower and it did not work properly when I used a navigation view with 3 levels deep.

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    18
    Vote Rating
    0
    koala2012 is on a distinguished road

      0  

    Default


    I met the same problem. I used itemsingletap, it seems that page switch too slow than itemtap hopefully it can be fixed

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi