2017-03-14 74 views
0

這個流星模板事件在iPhone上未能觸發,但可在Android手機和桌面瀏覽器上找到。任何建議如何解決這個問題? THX流星模板事件點擊不在iPhone上發射

Template.footer.events({ 
    'click .footerItem': function (event) { 
    //do stuff 
    } 
}); 
<template name="footer"> 
    <footer class="footer-row"> 
    {{#each footerButtons}} 
     <div class="footerItem" data-action={{this.action}}>{{this.label}}</div> 
    {{/each}} 
    </footer> 
</template> 

回答

0

這可能看起來像一個奇怪的答案,但嘗試添加以下的CSS類 'footerItem':

.footerItem { 
    cursor: pointer; 
} 
0

你爲什麼要使用data-action={{this action}}
這是與點擊事件產生衝突。從你的html中刪除該部分,然後重試,點擊應該在iPhone上運行。