web-components
web-components copied to clipboard
RichTextEditor buttons are broken in Vaadin FLow 24.3.9. Cannot disable bold, italic, etc. once they are enabled.
Description
When using the Vaadin 24 (Java, Flow) RichTextEditor object, we are unable to disable the bold option after enabling it. We have the same issue with all other buttons in the text editor toolbar.
The only difference is with button groups, such as the headings button group. For example, if you enable H1 heading, you can still switch to H2 or H3 heading but you cannot disable the heading option, you are stuck with one of the 3.
Expected outcome
To fix the issue.
Minimal reproducible example
RichTextEditor rte = new RichTextEditor();
rte.setWidth("400px");
add(rte);
Steps to reproduce
- Download the Vaadin 24 - Spring Boot starter project here: https://vaadin.com/hello-world-starters
- Add the snippet above in the MainView.java class
- Run the Application
- In the RichTextEditor, enable bold option (or italic, underline etc.).
- Then try disabling the bold option.
- You are unable to disable it.
https://github.com/vaadin/web-components/assets/53020140/11f1460b-5ab2-4c49-a9db-5e460442f374
Environment
Vaadin version(s): 24.3.9 OS: Windows 11 Java 17
Browsers
Chrome, Firefox