From 8cd9c7fb9a3668fa553b0e093078e87a1fbcdc6d Mon Sep 17 00:00:00 2001 From: Oliver Tacke Date: Wed, 5 Jun 2024 15:46:32 +0200 Subject: [PATCH] HFP-3875 Fix detection of collapse capabilities (#254) --- scripts/h5peditor-list-editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/h5peditor-list-editor.js b/scripts/h5peditor-list-editor.js index 09a79c22..dfaf455c 100644 --- a/scripts/h5peditor-list-editor.js +++ b/scripts/h5peditor-list-editor.js @@ -162,10 +162,10 @@ H5PEditor.ListEditor = (function ($) { */ self.hasCollapseCapabilities = () => { return ( - this.container?.parentNode.querySelector( + this.container?.parentNode.firstChild.querySelector( '.h5p-editor-flex-wrapper .h5peditor-button-collapse' ) instanceof HTMLElement || - this.container?.parentNode.querySelector( + this.container?.parentNode.firstChild.querySelector( '.h5peditor-label-button' ) instanceof HTMLElement );