Skip to content

Commit

Permalink
dialogs should start "hidden" until they are explicitly "shown"
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jun 27, 2024
1 parent b07b571 commit 0791741
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions haxe/ui/backend/DialogBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class DialogBase extends Box implements Draggable {
public function new() {
super();

// dialogs start off "hidden" until they are shown
_hidden = true;

dialogContainer = new haxe.ui.containers.VBox();
dialogContainer.id = "dialog-container";
dialogContainer.styleNames = "dialog-container";
Expand Down Expand Up @@ -141,9 +144,8 @@ class DialogBase extends Box implements Draggable {
}

public override function show() {
#if !haxeui_flixel
handleVisibility(false);
#end
super.show();
var dp = dialogParent;
if (modal) {
if (_overlay == null) {
Expand Down Expand Up @@ -279,7 +281,8 @@ class DialogBase extends Box implements Draggable {
if (event.canceled == true) {
return;
}


_hidden = true;
if (modal && _overlay != null) {
if (dp != null) {
dp.removeComponent(_overlay, destroyOnClose);
Expand Down

0 comments on commit 0791741

Please sign in to comment.