0
在我的Sencha應用程序中,我使用iframe顯示網頁。當我滾動iframe的內容時,它的容器面板也在滾動。由於它有時iframe不能正確滾動。是否需要更改iframe或panel的style/css ..?面板在sencha應用程序中使用iframe滾動
代碼:
Ext.define('Example.view.Dashboard', {
extend : "Ext.Panel",
alias : "widget.dashboard",
config : {
layout: 'vbox',
scrollable : false,
hideAnimation : {
type : "slideOut",
direction : 'down',
duration : 500
},
showAnimation : {
type : "slideIn",
direction : 'up',
duration : 500
},
},
initialize : function() {
this.callParent(arguments);
var cancelButton = {
ui : "normal",
handler : this.onBackButtonTap,
scope : this,
id : 'cancelDashboardButton',
itemId : 'cancelDashboardButton',
cls : 'button-left-arrow',
};
var topToolbar = {
xtype : "titlebar",
docked : "top",
cls : 'header',
name : 'detailToolbar',
title : "Dashboards",
itemId : 'dashboard-title',
items : [cancelButton]
};
var bottomToolbar = {
xtype : "toolbar",
docked : "bottom",
cls : 'footer',
};
this.add([topToolbar,
{
xtype : 'panel',
itemId:'webContainer',
flex:50,
html : '<div style="-webkit-overflow-scrolling:touch; height: 1000px; overflow: auto;"><iframe src="http://www.metacube.com/" border="0" frameborder="no" style="height:100%;width:100%;"> <iframe/></div>',
},
bottomToolbar]);
},
我試過dragstart事件中的stopPropagation方法,但它也不起作用。 –