1. #1
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Answered: Scroll on initial tab fails (ST2.0)

    Answered: Scroll on initial tab fails (ST2.0)


    Hi guys

    I have a strange problem with a 3 tabbed tabpanel (image below)

    Screen shot 2012-08-03 at 1.45.27 PM.png

    When the app loads, I cannot scroll - it merely bounce back to the original position
    When going to the Settings tab, then going back to the Schedule tab, it scrolls...


    Code:
                        var schedule = Ext.create('Ext.DataView', {
                            itemTpl: tpl,
                            store: offlineStore,
                            scrollable: true,
                            scroll: 'vertical',
                            itemCls: 'movie-entry', ...
    &

    Code:
                        Ext.create('Ext.tab.Panel', {
                            defaults: {
                                layout: 'fit'
                            },
                            fullscreen: true,
                            tabBarPosition: 'bottom',
                            items: [
                                {
                                    title: 'Schedule',
                                    iconCls: 'bookmarks',
                                    items: [
                                        toolbar_schedule,
                                        schedule
                                    ],
                                    listeners: {
                                        painted: function() {
    ...
    Anyone have ideas?

  2. Hi Douglas Mbiandou

    Sorry should have mentioned that I've already found a work around. The initial code was all placed in the index.html file. I then separated the code to index.html & app.js. The index.html file should still (for some unknown reason) have the following code in it.

    Code:
            <script type="text/javascript">
                //document.write hack, this area must NOT be empty!
            </script


    The actual problem was the location of the document.write which the app didn't quite like.

    Regards
    R

  3. #2
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Okay ... found the problem

    Okay ... found the problem


    Was actually an issue with the CSS file selector ...


    Code:
            var isiPad       = navigator.userAgent.match(/iPad/i)       != null;
            var isiPhone     = navigator.userAgent.match(/iPhone/i)     != null;
            var isiPod       = navigator.userAgent.match(/iPod/i)       != null;
            var isApple      = navigator.userAgent.match(/Mac OS X/i)   != null;
            var isBlackBerry = navigator.userAgent.match(/BlackBerry/i) != null;
            var isAndroid    = navigator.userAgent.match(/Android/i)    != null;
    
    
            if (isApple || isiPad || isiPhone) {
                cssfile = "apple.css"
            }
            else if (isAndroid) {
                cssfile = "android.css"
            }
            else if (isBlackBerry) {
                cssfile = "bb6.css"
            }
            else {
                cssfile = "sencha-touch.css"
            }
    
    
            document.write('<link href="../lib.2/resources/css/' + cssfile + '" rel="stylesheet" type="text/css" />');
    Is there a more elegant way of doing this?

  4. #3
    Sencha User
    Join Date
    Jul 2011
    Location
    Lyon
    Posts
    3
    Vote Rating
    0
    douglasmbiandou is on a distinguished road

      0  

    Default


    Please riyaad tell us where is this code.

  5. #4
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Solution...

    Solution...


    Hi Douglas Mbiandou

    Sorry should have mentioned that I've already found a work around. The initial code was all placed in the index.html file. I then separated the code to index.html & app.js. The index.html file should still (for some unknown reason) have the following code in it.

    Code:
            <script type="text/javascript">
                //document.write hack, this area must NOT be empty!
            </script


    The actual problem was the location of the document.write which the app didn't quite like.

    Regards
    R

Thread Participants: 1

Tags for this Thread

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