Skip to content

InteractionDialog not positioned correctly when pointing to an element positioned roughly in the middle of the screen #5028

@ThomasH99

Description

@ThomasH99

With 7.0.244 (but also earlier versions so not a recent regression). Run the code below, scroll down until the button "Close" is around the middle of the screen. The ID is now positioned on top of the button (hiding it) instead of being either above or below (even though there is space for it). When you scroll a bit further down, it is again positioned correctly.

Initial position:

Image

Positioned when scrolled to the middle and ID hides the "Close" button:

Image

Scrolling a bit further down and it is positioned correctly:

Image
                Container items = new Container(BoxLayout.y());
                Button interactionDialogTarget=new Button("");
                for (char c = 'A'; c <= 'Z'; c++) {
                    items.add(new Label(c + " entry "));
                    if(c=='J') {
                        items.add(interactionDialogTarget);
                    }
                }

                InteractionDialog interactionDialog = new InteractionDialog("InteractionDialog");
                interactionDialogTarget.setCommand((Command.create("Close", null, e -> interactionDialog.dispose())));
                Form form = new Form("Check dispose", new BoxLayout(BoxLayout.Y_AXIS));
                form.add(items);
                form.show();
                interactionDialog.showPopupDialog(interactionDialogTarget);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions