repo: janusweb action: commit revision: path_from: revision_from: 167e6c29eb8e4b0fc6c3f716bf4b4592131d671e: path_to: revision_to:
commit 167e6c29eb8e4b0fc6c3f716bf4b4592131d671e Author: James BaicoianuDate: Sun Apr 18 23:03:44 2021 -0700 Fixed error when nav ui app is "detached" diff --git a/media/assets/webui/apps/navigation/navigation.js b/media/assets/webui/apps/navigation/navigation.js
--- a/media/assets/webui/apps/navigation/navigation.js
+++ b/media/assets/webui/apps/navigation/navigation.js
@@ -15,12 +15,13 @@ elation.elements.define('janus.ui.navigation', class extends elation.elements.ui
}
getClient() {
var node = this;
- while (node) {
+ while (node && node !== document) {
if (node.dataset['elationComponent'] == 'janusweb.client') {
return elation.component.fetch(node);
}
node = node.parentNode
}
+ return elation.component.fetch(document.querySelector('[data-elation-component="janusweb.client"]'));
}
updateCurrentURL() {
var room = this.janusweb.currentroom;
@@ -84,12 +85,13 @@ elation.elements.define('janus.ui.statusindicator', class extends elation.elemen
getClient() {
var node = this;
- while (node) {
+ while (node && node !== document) {
if (node.dataset['elationComponent'] == 'janusweb.client') {
return elation.component.fetch(node);
}
node = node.parentNode
}
+ return elation.component.fetch(document.querySelector('[data-elation-component="janusweb.client"]'));
}
updateCurrentURL(room) {
if (!room && this.janusweb.currentroom) {
@@ -331,12 +333,13 @@ elation.elements.define('janus.ui.urlbar', class extends elation.elements.ui.pan
}
getClient() {
var node = this;
- while (node) {
+ while (node && node !== document) {
if (node.dataset['elationComponent'] == 'janusweb.client') {
return elation.component.fetch(node);
}
node = node.parentNode
}
+ return elation.component.fetch(document.querySelector('[data-elation-component="janusweb.client"]'));
}
updateRoom() {
// Remove listeners from previous room
-----END OF PAGE-----