Fixed #7211 - editor losing focus in Tab Panel and fix default value not set properly #7293
+6
−2
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.
I'm checking for losing focus occurs when the same
ref
used by two different editors (#7211 ). The focus issue doesn't occur in 4.3.0-rc.1, but occurs in 4.2.5 release. But the latest release (4.3.0-rc.1) had a defect below.Defect Fixes
Default value doesn't set properly because the
setText/Contents
not being called whenvalue
is available. After some digging into it, it was updated because of security vulnerability related to HTML injection.Previously, the Editor use
dangerouslyPasteHTML
(here) which cause vulnerability, and then being replaced withconvert
. But theconvert
function ONLY sanitize the HTML and resulting a delta which doesn't set editor's content, so I fix it: afterconvert
-ing the HTML, callsetContents
to the Editor.In
master
branch: https://github.com/user-attachments/assets/c5460fb2-6c3d-44dc-b153-ecdcb85d1c20Fixed in this PR: https://github.com/user-attachments/assets/2154fb70-3318-4d76-9506-0c2fb89979c1