From a061ff05d6cfba396aa086c4ffb2a3ab86e6c125 Mon Sep 17 00:00:00 2001 From: Burkhard Pauli Date: Thu, 25 May 2023 15:18:15 +0200 Subject: [PATCH] Add check if id of tab item is available - add check if id of tab item is available before using it as selector to be backward compatible with customer code. --- .../clientlibs/panelcontainer/v1/js/PanelContainer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/src/content/jcr_root/apps/core/wcm/components/commons/editor/clientlibs/panelcontainer/v1/js/PanelContainer.js b/content/src/content/jcr_root/apps/core/wcm/components/commons/editor/clientlibs/panelcontainer/v1/js/PanelContainer.js index 04d0d4a8fc..1204bd7046 100644 --- a/content/src/content/jcr_root/apps/core/wcm/components/commons/editor/clientlibs/panelcontainer/v1/js/PanelContainer.js +++ b/content/src/content/jcr_root/apps/core/wcm/components/commons/editor/clientlibs/panelcontainer/v1/js/PanelContainer.js @@ -104,7 +104,11 @@ if (that._config.el && that._config.panelContainerType) { var items = $(this._config.el).find(that._config.panelContainerType.itemSelector); items.each(function(index) { - if ($(this).is("#" + that._config.el.id + " " + that._config.panelContainerType.itemActiveSelector)) { + var activeItemSelector = that._config.panelContainerType.itemActiveSelector; + if (that._config.el.id) { + activeItemSelector = "#" + that._config.el.id + " " + activeItemSelector; + } + if ($(this).is(activeItemSelector)) { activeIndex = index; return false; }