ker*_*ene 8 javascript internet-explorer sencha-touch cordova windows-8.1
我正在开发一个Cordova混合应用程序,目前正在使用Sencha Touch 2在Windows 8.1上遇到问题.我在listitem上有一些带有一些子元素的div.我定义了一个点击监听器.这适用于Android和IOS,但这在使用Internet Explorer的Win8.1上不起作用.我总是得到上面列出的listitem-element而不是点击的div-container.
这是简化的例子:
视图:
Ext.define( 'App.view.MyDataView', {
xtype: 'mydataview',
extend: Ext.dataview.List ,
config: {
inline: false,
title: "myTitle",
scrollToTopOnRefresh: false,
cls: 'MyDataView',
itemCls: 'MyDataViewItem',
pressedCls: 'MyDataViewItemPressed',
grouped: true,
listeners: {
tap: {
element: 'element',
//delegate: '.something',
fn: function (e)
{
console.log(e.target.className)
}
}
},
deferEmptyText: false,
infinite: true,
variableHeights: true,
itemTpl: new Ext.XTemplate(
[
'<div class="red" style="background-color:red;width:50%">',
'red',
'<div class="black" style="background-color:black;width:80%">',
'<div class="blue" style="background-color:blue;width:30%">blue</div>',
'black</div>',
'</div>'
].join( '' ),
{
compiled: true,
getInteractable: function() {},
//some member functions here...
}
)
}
});
Run Code Online (Sandbox Code Playgroud)
e.target on tap listener总是给我以下信息:
<div class="x-unsized x-list-item WorkingHoursDataViewItem x-has-height x-list-item-tpl" id="ext-simplelistitem-85" style="height: 42px !important; min-height: 42px !important; transform: translate3d(0px, 264px, 0px);">
<div class="x-unsized x-list-disclosure x-item-hidden" id="ext-component-233" style="display: none !important;"></div>
<div class="x-innerhtml" id="ext-element-815">
<div class="red" style="width: 50%; background-color: red;">
red
<div class="black" style="width: 80%; background-color:black;">
<div class="blue" style="width: 30%; background-color:blue;">
blue
</div>
</div>
black
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我通过事件,e,目标浏览了很多,但是没有对点击的div容器的引用:/
提前致谢!
//编辑:简化示例//它与分组相关:true - >如果我发表评论,一切都按预期工作
| 归档时间: |
|
| 查看次数: |
155 次 |
| 最近记录: |