I have a set of Controls which use PopupView
.
Since the update to Charm 4.0.0, they show some weird behaviour.
When I selected a Node
contained in the PopupView, the PopupView used to get closed. Now the PopupView gets closed but immediately shows up again. Furthermore as soon as I click outside the PopupView it gets closed, but I am not able to show it again.
I've tested it with the example from the Gluon javadoc and experienced the same behaviour regarding the second issue:
public class MyApp extends MobileApplication{
private Button button;
private PopupView popupView;
@Override
public void init() {
addViewFactory(HOME_VIEW, () -> {
button = new Button("Click");
button.setOnAction(event -> popupView.show());
popupView = new PopupView(button);
VBox vBox = new VBox();
vBox.getChildren().addAll(new Label("Choice 1"), new Label("Choice 2"), new Label("Choice 3"));
vBox.setSpacing(5);
popupView.setContent(vBox);
return new View(button) {
@Override
protected void updateAppBar(AppBar appBar) {
appBar.setTitleText("PopupView");
}
};
});
}
}
Thanks for reporting. I've filed an issue so it get fixed as soon as possible.
In the meantime, a workaround for the PopupView can be this: