Skip to content

Commit db9e131

Browse files
authored
Merge pull request #1004 from rore22x/fix/stuck-tooltip
add attach handler for detach when widget already attached #1003
2 parents 7f24523 + d805369 commit db9e131

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)