2014-07-10 63 views
0

我正在使用Ember JS的应用程序。按钮点击不适用于MAC设备(PC或手机),但相同的代码正在处理其他人。请帮我这个Ember js按钮点击在Mac上无法正常工作

{{#view App.AddNewFirm contentBinding="this"}} 
    <div style="cursor:"pointer"> 
    <button style="cursor:pointer" class="btn btn-info"><i class="fa fa-user fa-fw"></i> Add Firm</button> 
    </div> 
    {{/view}} 
+0

* MAC *你的意思是苹果? – monners

+0

Yupss ...我在我的手机上试过这个,但也没有在这方面工作。在其他人喜欢Windows和Android的工作..链接是http://test.mixorg.com/handsOn/app/ – Alpesh

回答

1

我们有同样的问题, 绑定到视图不火的iPad设备上的点击处理。

我们可以通过按钮直接绑定click处理程序,使用didInsertElement挂钩,而不是使用单击处理余烬修复它提供

App.AddNewFirmView = Ember.View.extend({   
    didInsertElement:function(){ 
    this.$('button').click(function(){ 
     console.log('click'); 
    });    
    },   
}); 

你也可以一个<button> </button>内包装你的观点,虽然我不鼓励这种。

+0

非常感谢..它的工作。 – Alpesh

+0

你应该看到这个:http://swsharinginfo.blogspot.in/2013/03/solution-for-click-event-issue-on-ipad.html – arbc