Javascript FireFox中未触发余烬操作
这是一个在Chrome中工作但在firefox中不工作的小游戏 我发现了类似的问题,但没有理由不起作用 我正在使用Firefox v61.0.1和Chrome v67.0.3396.99Javascript FireFox中未触发余烬操作,javascript,firefox,ember.js,Javascript,Firefox,Ember.js,这是一个在Chrome中工作但在firefox中不工作的小游戏 我发现了类似的问题,但没有理由不起作用 我正在使用Firefox v61.0.1和Chrome v67.0.3396.99 //application.hbs <div class="box"> <button type="button" class="close note-close" aria-label="Close"> <span aria-hidden="true" class="
//application.hbs
<div class="box">
<button type="button" class="close note-close" aria-label="Close">
<span aria-hidden="true" class="close" {{action 'testAction'}}>×</span>
</button>
</div>
//application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
testAction: function() {
alert("Close Button Working");
}
}
});
//application.hbs
&时代;
//application.js
从“余烬”导入余烬;
导出默认的Ember.Controller.extend({
appName:“余烬旋转”,
行动:{
testAction:function(){
警报(“关闭按钮工作”);
}
}
});
如果您在Chrome中单击close按钮,它将触发controller中的testAction。但在firefox中没有错误,但不会触发controller中的my testAction。单击按钮元素的嵌套元素不起作用 将操作添加到按钮元素并使用(onclick)
&时代;
“不工作”-所有问题描述中最无用的-没有错误,也没有任何“不工作”的迹象-一切看起来都正常-它应该做什么?它在两种浏览器中都没有任何功能,因此您必须描述problem@JaromandaX更新了我的问题