TINYDOC-3566 - Fix textarea id selector in suggestededits-access-read live demo - #4297
Merged
Conversation
MitchC1999
approved these changes
Jul 29, 2026
ArvinJ-H
approved these changes
Jul 29, 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.
Ticket: TINYDOC-3566
Site: Staging branch
Changes:
modules/ROOT/examples/live-demos/suggestededits-access-read/index.js— corrected thequerySelectorcall on line 3 to targettextarea#suggestededits-access-readinstead oftextarea#suggestededits-access-feedback. The mismatched id belongs to the siblingsuggestededits-access-feedbackdemo, so this was a copy-paste leftover. Thetinymce.initselector on line 7 was already correct; only the element lookup was wrong.What was broken
The "Edit on CodePen" export for that demo. The CodePen payload is self-contained: only the demo's own HTML and JS are sent. The sibling textarea is absent there, so
tinymceElementisnulland thegetAttribute('suggestededits-model')call on line 4 throws aTypeError, leaving the pen uninitialised.The demo on the docs page was not broken. The live-demo widget renders every demo into one shared document — there is no per-demo iframe — and both demos are emitted by the same partial,
modules/ROOT/partials/configuration/suggestededits_access.adoc. The wrong selector therefore still resolved, to the sibling demo's textarea on the same page. Both demos'suggestededits-modelattributes are byte-for-byte identical, so the read demo received correct model data regardless.That on-page behaviour held only by coincidence: it depended on the sibling demo staying co-located and the two models staying identical.
What the fix does
Verification
npx antora ./antora-playbook-local.yml) completes with no errors or warnings.querySelectorandtinymce.initselectors — 11 paired occurrences, all matching.textarea#suggestededits-access-readand not the sibling's, confirming the pen depended on an element it never ships. Payload composition was verified from the build; a pen was not opened and run.suggestededits-access-feedbackdemo is untouched.Pre-checks:
hotfix/8/TINYDOC-3566Review: