Sencha Touch 2:应用构建后面板不会滚动

Sencha Touch 2: panel won't scroll after app build

我有一个 Sencha Touch 应用程序,它由带有多个页面的选项卡栏布局组成,其中一个页面是列表视图,另一个是 "detail view",它基本上是一个面板。

在我运行“sencha app build”之后面板不会滚动。除了面板不再滚动之外,生成的构建包工作正常。

我在 OS X Yosemite.

上使用 Sencha Touch 2.4.1 和 Sencha Cmd v5.1.1.39

应用程序的演示在这里:http://simbro5-80.terminal.com

源代码在这里:http://github.com/simbro/Geograph

以下是一些片段:

主视图(扩展 Ext.tab.Panel):

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

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

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

项目详细信息视图:

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'
            }]
        }]
    }
});

我也遇到了同样的问题。修复了这个 post 的问题 Sencha Forum

只需在 app.js 中注释掉加载掩码的代码,如下所示:-

 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);
//        });
    },