From e9906eaf8eca559529cc1fe9e06d85060962478c Mon Sep 17 00:00:00 2001 From: Mario Buikhuizen Date: Mon, 4 Sep 2023 16:20:03 +0200 Subject: [PATCH] fix: support for notebook 7 Notebook 7 requires a different way to detect if the app runs in a notebook context. --- CHANGES.rst | 2 ++ jdaviz/app.vue | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 71fd42cd04..192488a9d3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -109,6 +109,8 @@ Bug Fixes - Fixes tracebacks from plugins opened in popout windows. [#2411] +- Fixes app not displaying properly in Notebook 7. [#2420] + Cubeviz ^^^^^^^ diff --git a/jdaviz/app.vue b/jdaviz/app.vue index 73b6ddc75d..5b08c49f28 100644 --- a/jdaviz/app.vue +++ b/jdaviz/app.vue @@ -167,7 +167,8 @@ export default { methods: { checkNotebookContext() { this.notebook_context = document.getElementById("ipython-main-app") - || document.querySelector('.jp-LabShell'); + || document.querySelector('.jp-LabShell') + || document.querySelector(".lm-Widget#main"); /* Notebook 7 */ return this.notebook_context; }, trayItemVisible(trayItem, tray_items_filter) {