Skip to content

Commit 22aa6aa

Browse files
committed
Additional Fixed for Window - Add checks for errai support
1 parent bbbe1cc commit 22aa6aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/gwt/material/design/addins/client/window/MaterialWindow.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public class MaterialWindow extends MaterialPanel implements HasCloseHandlers<Bo
111111
private MaterialAnimation closeAnimation;
112112

113113
private MaterialDnd dnd;
114+
private boolean initialized;
114115

115116
public MaterialWindow() {
116117
super(AddinsCssName.WINDOW);
@@ -137,7 +138,10 @@ public MaterialWindow(String title, Color backgroundColor, Color textColor, Colo
137138
protected void onLoad() {
138139
super.onLoad();
139140

140-
initialize();
141+
if (!initialized) {
142+
initialize();
143+
initialized = true;
144+
}
141145
}
142146

143147
/**
@@ -392,4 +396,4 @@ public void setDndArea(Object dndArea) {
392396
dnd.draggable(JsDragOptions.create(new Restriction(dndArea, true, 0, 0, 1.2, 1)));
393397
}
394398
}
395-
}
399+
}

0 commit comments

Comments
 (0)