From 2fe858ef2e3c3a8b64097d53bcda1663019a5399 Mon Sep 17 00:00:00 2001 From: Emupedia Date: Mon, 7 Jun 2021 23:25:39 +0300 Subject: [PATCH] More work --- beta/emuos/assets/js/window.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/beta/emuos/assets/js/window.js b/beta/emuos/assets/js/window.js index 22e701d3..5bb0eb4a 100644 --- a/beta/emuos/assets/js/window.js +++ b/beta/emuos/assets/js/window.js @@ -1325,6 +1325,7 @@ var o = this.options; if (o.newtabUrl !== '') { + this.destroy(); window.open(o.newtabUrl, '_blank'); } @@ -1866,7 +1867,11 @@ // on top, that could be active modal // noinspection JSUnresolvedFunction $elem.add($modal).each(function() { - $(this).children('.' + self.classes.windowContent).data(self._cnst.dataPrefix + 'window')._setConnectedButtonState(); + var $el = $(this).children('.' + self.classes.windowContent).data(self._cnst.dataPrefix + 'window'); + + if ($el) { + $el._setConnectedButtonState(); + } }); } else { move = true;