Open vt512 opened 2 days ago
How did you test it? The latest 24.4.x version does currently not include the mentioned fix - a version containing this fix is not released.
Oh, sorry, you are right. I forgot to mention it in the example above. I created a subclass of RichTextEditor and overwrote the function setPresentationValue() in a way similar to the patch from #6638. I will modify the example in the issue text above.
Description
Setting HTML text via
asHtml().setValue()
to a RichTextEditor which is displayed in a GridLayout doesn't display the HTML text correctly in Firefox.Longer description: Add a RichTextEditor directly to a VerticalLayout (rte1) and an other one to a GridLayout (rte2). In both RichTextEditors set an HTML value via
asHtml().setValue()
. In rte1 the HTML value is displayed correctly, in rte2 the styling is corrupt (e.g. bullet list is missing) and newlines are lost.The error occurs only in Firefox. In Chromium the HTML text is displayed correctly also in rte2.
The same error appears when the RichTextEditor is placed in a Dialog which was already reported in #6636 and fixed in #6638, but the fix doesn't fix the problem, when placed inside a GridLayout.
Expected outcome
The RichTextEditor should display the HTML text inside a GridLayout correctly in the same way as it does when it is placed on a View directly.
Minimal reproducible example
Add
to the pom.xml.
Extend RichTextEditor and overwrite
setPresentationValue()
in a way similar to the patch in #6638:Use that class in the example:
Steps to reproduce
Execute the minimal example above. Two RichTextEditors and a Button are displayed: The first RTE displays the HTML text correctly with a bullet list of two bullet points, a click on the Button opens a Dialog with a RTE that displays the HTML text also correctly, the second RTE displays the HTML text invalid in one line without line breaks and no bullet list.
Environment
Vaadin version(s): 24.4.11 OS: Linux
Browsers
Firefox