Skip to content

Commit cd7dd01

Browse files
namedgraphclaude
andcommitted
Defer 'active' token on new tab panes to ldh:ActivateTab
Newly-appended tab-body elements were defaulting to class="tab-pane active", which briefly left two panes carrying the 'active' token (the new one and the currently-active local one) between append and ldh:ActivateTab. Code running in that window — notably ldh:LeftSidebar, which reads ldt:base() and sd:endpoint() off the active pane — would see ambiguous state and crash. Pass class="tab-pane" explicitly so only ldh:ActivateTab promotes a pane to active. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 72804d7 commit cd7dd01

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,10 @@ WHERE
559559
<!-- no pane: create one with sidebar -->
560560
<xsl:otherwise>
561561
<xsl:variable name="tab-body" as="element()">
562+
<!-- inert class: ldh:ActivateTab (called from ldh:RenderTab below) is the single source of truth for the 'active' token. Defaulting to 'tab-pane active' here would briefly leave two panes active (this one + the currently-active local one) and crash ldt:base()/sd:endpoint() in any code that runs between append and ActivateTab (e.g. ldh:LeftSidebar). -->
562563
<xsl:apply-templates select="$results/rdf:RDF" mode="bs2:TabBody">
563564
<xsl:with-param name="id" select="$tab-body-id"/>
565+
<xsl:with-param name="class" select="'tab-pane'"/>
564566
<xsl:with-param name="mode" select="$mode"/>
565567
<xsl:with-param name="base" select="$tab-base"/>
566568
<xsl:with-param name="endpoint" select="$endpoint"/>
@@ -718,6 +720,7 @@ WHERE
718720
<xsl:variable name="tab-body" as="element()">
719721
<xsl:apply-templates select="$results/rdf:RDF" mode="bs2:TabBody">
720722
<xsl:with-param name="id" select="$tab-body-id"/>
723+
<xsl:with-param name="class" select="'tab-pane'"/>
721724
<xsl:with-param name="mode" select="$mode"/>
722725
<xsl:with-param name="about" select="$doc-uri"/>
723726
</xsl:apply-templates>

0 commit comments

Comments
 (0)