Hello all!
It looks very much like a component “Text” has a regression in the latest version Vaadin(24.5.2)
Code example:
@Route("confirm-view")
@CdiComponent
public class ConfirmView extends VerticalLayout {
@Serial
private static final long serialVersionUID = 1L;
@PostConstruct
public void init() {
var textButton = new Button("Confirm with Text", e -> {
ConfirmDialog dialog = new ConfirmDialog();
dialog.setHeader("Header");
dialog.setText(new Text("Message"));
dialog.setCloseOnEsc(true);
dialog.setConfirmButton(new Button("Ok"));
dialog.setCancelText("Cancel");
dialog.setCancelable(true);
dialog.addCancelListener(event -> dialog.close());
dialog.open();
});
var spanButton = new Button("Confirm with Span", e -> {
ConfirmDialog dialog = new ConfirmDialog();
dialog.setHeader("Header");
dialog.setText(new Span("Message"));
dialog.setCloseOnEsc(true);
dialog.setConfirmButton(new Button("Ok"));
dialog.setCancelText("Cancel");
dialog.setCancelable(true);
dialog.addCancelListener(event -> dialog.close());
dialog.open();
});
addClassName("centered-content");
add(textButton, spanButton, new Text("Text content"));
}
}