Skip to content

Dialog when dragged to right side of view shrinks in size #10391

Closed

Description

@mukherjeesudebi

Description

Dialog in vaadin 24.9 when dragged to right side of view shrinks in size but does not shrink when dragged to the left side.
Issue also happens in 24.8

v24_Draggable_Dialog.mp4

The issue does not happen in vaadin 25 with base styles

v25_Draggable_Dialog.mp4

Expected outcome

The dialog should not shrink when dragged.

Minimal reproducible example

@Route("dialog-basic")
public class DialogBasic extends Div {
	public DialogBasic() {
		Dialog dialog = new Dialog();
		dialog.setDraggable(true);
		dialog.setHeaderTitle("New employee");

		VerticalLayout dialogLayout = createDialogLayout();
		dialog.add(dialogLayout);

		Button saveButton = createSaveButton(dialog);
		Button cancelButton = new Button("Cancel", e -> dialog.close());
		dialog.getFooter().add(cancelButton);
		dialog.getFooter().add(saveButton);

		Button button = new Button("Show dialog", e -> dialog.open());

		add(dialog, button);

		dialog.open();
	}

	private static VerticalLayout createDialogLayout() {
		VerticalLayout dialogLayout = new VerticalLayout(new Div(new Text(
				"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.")));
		return dialogLayout;
	}

	private static Button createSaveButton(Dialog dialog) {
		Button saveButton = new Button("Add", e -> dialog.close());
		saveButton.addThemeVariants(ButtonVariant.LUMO_PRIMARY);

		return saveButton;
	}
}

Steps to reproduce

Add the view to a v25 application and a v24 application to replicate

Environment

Vaadin version(s): tested in 24.9.3, 24.8.8

Browsers

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BFPBug fix prioritised by a customervaadin-dialog

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions