fix(UVE): Ensure Window Object Re-Initialization in UVE iframe #30989
+119
−69
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.
This pull request includes several changes aimed at improving the functionality and testing of the
EditEmaEditorComponent
in thecore-web
library. The key updates involve refactoring the iframe URL handling, enhancing the test coverage, and improving the inline editing feature.Refactoring and Improvements:
src
binding to useuveStore.$iframeURL()
instead of$editorProps().iframe.src
inedit-ema-editor.component.html
.setIframeContent
method to include anenableInlineEdit
parameter and moved the inline editing script handling to a new methodhandleInlineScripts
inedit-ema-editor.component.ts
. [1] [2]Testing Enhancements:
edit-ema-editor.component.spec.ts
to simulate iframe load events.edit-ema-editor.component.spec.ts
. [1] [2] [3] [4] [5]Store and State Management:
$iframeURL
in thewithEditor
store to dynamically generate iframe URLs, including handling traditional pages by returningabout:blank
. [1] [2] [3] [4] [5]src
property from theEditorProps
interface as it is now handled by the computed$iframeURL
.Code Cleanup:
requestAnimationFrame
calls and related code fromedit-ema-editor.component.ts
. [1] [2]withEditor.ts
.These changes collectively enhance the maintainability, functionality, and testability of the
EditEmaEditorComponent
.Video
issue-30981-uve-ensure-window-object-re-initialization-in-uve-iframe.mov
This PR fixes: #30981