fix: add retry for appending existing subtitle to iframed editor#2681
Open
laurelfulford wants to merge 3 commits intotrunkfrom
Open
fix: add retry for appending existing subtitle to iframed editor#2681laurelfulford wants to merge 3 commits intotrunkfrom
laurelfulford wants to merge 3 commits intotrunkfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a timed retry mechanism to ensure an existing post subtitle is appended beneath the post title in the (WP 7.0+) iframed editor, addressing cases where the title wrapper isn’t available immediately on load.
Changes:
- Extend
appendSubtitleToTitleDOMElementwith a bounded retry loop (100ms intervals, up to 20 attempts) when the title wrapper element isn’t yet present in the editor canvas. - Update JSDoc for the DOM-append helper to include the internal retry counter parameter.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
All Submissions:
Changes proposed in this Pull Request:
This PR adds a timed retry to attach the subtitle to the post title when populated. Otherwise, in WP 7.0 posts with a populated subtitle don't actually preview them in the editor until they're edited again.
Closes NEWS-1761
How to test the changes in this Pull Request:
Other information: