Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #7211 - editor losing focus in Tab Panel and fix default value not set properly #7293

Conversation

addeeandra
Copy link
Contributor

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 when value 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 with convert. But the convert function ONLY sanitize the HTML and resulting a delta which doesn't set editor's content, so I fix it: after convert-ing the HTML, call setContents to the Editor.

In master branch: https://github.com/user-attachments/assets/c5460fb2-6c3d-44dc-b153-ecdcb85d1c20

Fixed in this PR: https://github.com/user-attachments/assets/2154fb70-3318-4d76-9506-0c2fb89979c1

Copy link

vercel bot commented Feb 21, 2025

Deployment failed with the following error:

Creating the Deployment Timed Out.

@tugcekucukoglu tugcekucukoglu merged commit 9501f36 into primefaces:master Feb 21, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants