close popup when press back button in remote control LG TV

Hi all,
i show popup in panel, and press back button in remote control of LG TV, my app back to previous panel, how to only close popup and not back to previous panel

i try using signal in panel but not working in TV
{ 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) {'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; } },
Thank you.


  • Hi tienn2t,

    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.
Sign In or Register to comment.