fix: render attribute JSON in Safari using textContent#13
Open
urre wants to merge 1 commit into
Open
Conversation
The Subject/Context/Action attribute JSON is stored in hidden `<code class="...-json hide">` elements (`.hide` is `display:none`) and read by the inline script to pretty-print it. The script used `.innerText`, which WebKit/Safari returns as an empty string for `display:none` elements (Chrome falls back to the text content). As a result the JSON blocks rendered empty in Safari while working in Chrome. Switch the three reads to `.textContent`, which is unaffected by CSS rendering state and behaves consistently across browsers. Also replace the dead `$!button_color` Velocity quiet-reference on the Continue button (never populated by the plugin or a theme, so it rendered as nothing) with the literal `button-primary` class. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
slunker
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The debug-attribute action page renders the Subject / Context / Action attribute JSON inside hidden
<code class="...-json hide">elements (.hideisdisplay:none) and uses an inline script to pretty-print them into the visible<pre>blocks.The script read those elements with
.innerText. WebKit/Safari returns an empty string forinnerTextof adisplay:noneelement, whereas Chrome falls back to the underlying text. The result: the JSON blocks rendered as empty boxes in Safari while working correctly in Chrome.[]boxesFix
.innerTextreads to.textContent, which ignores CSS rendering state and behaves consistently across browsers (and is the value we actually want — the raw JSON the server wrote into the element).$!button_colorVelocity quiet-reference on the Continue button with the literalbutton-primaryclass. It was never populated by the plugin or a theme, so it silently rendered as nothing.Testing
Built the plugin and deployed it to a local Curity Identity Server (11.x), attached the action to an authenticator, and confirmed the Subject/Context/Action JSON now renders in Safari as it already did in Chrome.
Copy JSON(which uses.innerHTML) was unaffected.Notes
1.4.3— let me know if you'd prefer a1.4.4bump for release.Screenshot