1

I have a Sencha Touch app that is comprised of a tab bar layout with multiple pages, one of the pages is a list view and one is a "detail view" which is basically a panel.

The panel won't scroll after I run "sencha app build". The resulting build package works fine apart from the fact the panel no longer scrolls.

I using Sencha Touch 2.4.1 and Sencha Cmd v5.1.1.39 on OS X Yosemite.

The demo of the app is here: http://simbro5-80.terminal.com

The source code is here: http://github.com/simbro/Geograph

Here are some snippets:

Main View (extends Ext.tab.Panel) :

{
    title: 'News',
    layout: 'fit',
    iconCls: 'news',

    items: [
        {
            xtype: 'itemsListView'
        }
    ]
},
{
    title: 'Item Details',
    layout: 'fit',
    hidden: true,

    items: [
        {
            xtype: 'itemDetailView'
        }
    ]
},

Item Detail View:

Ext.define('Geograph.view.ItemDetailView', {
    extend: 'Ext.Panel',
    xtype: 'itemDetailView',
    id: 'itemDetailPage',

    config: {
        title: 'Item Detail',
        scrollable: {
            direction: 'vertical'
        },
        styleHtmlContent: true,
        title: 'Details',
        layout: 'fit',
        tpl: [
            '<h2>{title}</h2>',
            '<div><b>{creator}</b></div>',
            '<div><span class="itemDetailDate">{date:date("l, jS F Y")}</span></div>',
            '<div><br />{description}</div>'
        ],
        data: null,
        items: [{
            docked: 'top',
            xtype: 'titlebar',
            title: 'Item Details',
            items: [{
                ui: 'back',
                text: 'Back',
                id: 'newsBackBtn'
            }]
        }]
    }
});
SimBot
  • 109
  • 2
  • 10
  • How do you know that the panel scrolls before you run "sencha app build"? – gus27 Feb 23 '15 at 10:07
  • I know the panel scrolls before I run "sencha app build" because I can access the app via my web browser by running "sencha web start" and hitting http://localhost:1841, where scrolling is fine. When I build the app, I navigate to http://localhost:1841/build/production/Geograph, where scrolling is broken. – SimBot Feb 23 '15 at 11:12

1 Answers1

0

I was also facing the same problem. Fixed the issue from this post Sencha Forum

Just comment out the codes for loading mask in your app.js like this:-

 launch: function() {
        // Destroy the #splash-logo element
        Ext.fly('splash-logo').destroy();

        // Initialize the main view
        Ext.Viewport.add(Ext.create('Geograph.view.Main'));

        Ext.Viewport.add(Ext.create('Geograph.view.SearchForm'));

//        var loadingMask = new Ext.LoadMask(Ext.getBody(), {msg:"wait msg..."}); 
//
//        // Before the AJAX event, enable the mask on the application's
//        // Viewport so it shows regardless of the active view.
//        Ext.Ajax.on('beforerequest', function() {
//            Ext.Viewport.setMasked(loadingMask);
//        });  

        // When the AJAX request completes disable the mask.
//        Ext.Ajax.on('requestcomplete', function() {
//            Ext.Viewport.setMasked(false);
//        });
    },
Sujata Chanda
  • 3,355
  • 2
  • 21
  • 35
  • Sujata you're a genius! That totally fixed it! Thanks for taking the time to look at the source too. – SimBot Feb 23 '15 at 15:14