You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a workaround .asDelta().isEmpty works, but first time the contents is removed in RTE. Running a dummy rte.asDelta() fix this. Seems like another bug?
asDelta intentionally clears the component value, probably because the delta value is not synchronized with the HTML value unless asDelta has been called previously. It would thus always be empty even if there is an HTML value. So mixing asHtml and asDelta is not quite supported by the component.
asDelta intentionally clears the component value, probably because the delta value is not synchronized with the HTML value unless asDelta has been called previously. It would thus always be empty even if there is an HTML value. So mixing asHtml and asDelta is not quite supported by the component.
OK, this is only a work around for the bug. Could test for "<p><br></p>", but feels that is even more dirty workaround
Description
When contents in RichTextEditor is removed
.asHtml().value = "<p><br></p>"
. .asHtml().isEmpty returns false, so cannot test if contents is emptyExpected outcome
.asHtml().isEmpty should return true when everything is deleted in the editor
Minimal reproducible example
Add contents an remove it, test .asHtml().isEmpty
Steps to reproduce
.asHtml().isEmpty
Environment
Hilla: 24.6.0
Flow: 24.6.0
Vaadin: 24.6.0
Copilot: 24.6.0
Frontend Hotswap: Disabled, using pre-built bundle
OS: amd64 Windows 11 10.0
Java: JetBrains s.r.o. 21.0.3
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Java Hotswap: Hotswap is partially enabled
IDE Plugin: 1.4.3 IntelliJ
Browsers
No response
The text was updated successfully, but these errors were encountered: