{
kind:'enyo.Signals',
onBackButton:'backChanged'
},
backChanged:function(){
var reg = /^filmDetailPanel*/;
console.log('vao nhe',this.parent.getActive().name,localStorage.getItem(clip.Global.popupShowing));
if(reg.test(this.parent.getActive().name) == true && localStorage.getItem(clip.Global.popupShowing)!=null) {
enyo.Spotlight.spot(this.get('lastControlFocus'));
switch (localStorage.getItem(clip.Global.popupShowing)){
case 'popupNotice':
this.$.popupNotice.setShowing(false);
console.log('aaa',localStorage.getItem(clip.Global.popupShowing));
break;
case 'popupLogin':
this.$.popupLogin.setShowing(false);
console.log('adwsaa',localStorage.getItem(clip.Global.popupShowing));
break;
case 'popupCentered':
this.$.popupCentered.setShowing(false);
console.log('adaa',localStorage.getItem(clip.Global.popupShowing));
break;
}
localStorage.removeItem(clip.Global.popupShowing);
return true;
}
},
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
On the TV, the back button registers as either as either a popstate or a keydown event rather than an onBackButton event. You can find the detail that you're looking for on the webOS TV developer site here.
That should give you a good idea of how to handle it.