Skip to content

Commit d805369

Browse files
committed
add attach handler for detach when widget already attached #1003
1 parent 7f24523 commit d805369

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gwt-material/src/main/java/gwt/material/design/client/ui/MaterialTooltip.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ public void setWidget(final Widget widget) {
206206
}
207207

208208
if (this.widget.isAttached()) {
209+
widget.addAttachHandler(event -> {
210+
if (!event.isAttached()) {
211+
unload();
212+
}
213+
});
209214
reload();
210215
} else {
211216
// Smart detect the attachment and detachment of widget to update the tooltip

0 commit comments

Comments
 (0)