web-components icon indicating copy to clipboard operation
web-components copied to clipboard

RichTextEditor buttons are broken in Vaadin FLow 24.3.9. Cannot disable bold, italic, etc. once they are enabled.

Open fxpaquette opened this issue 10 months ago • 0 comments

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

  1. Download the Vaadin 24 - Spring Boot starter project here: https://vaadin.com/hello-world-starters
  2. Add the snippet above in the MainView.java class
  3. Run the Application
  4. In the RichTextEditor, enable bold option (or italic, underline etc.).
  5. Then try disabling the bold option.
  6. 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

fxpaquette avatar Apr 10 '24 20:04 fxpaquette