mirror of
https://github.com/gristlabs/grist-core.git
synced 2025-06-13 20:53:59 +00:00
(core) fixes hanging Save/Revert tooltips
Summary:
- Clicking quickly on the small save/revert button was caussing the
tooltip to stay around.
- But if user waited a little bit before clicking the save button,
the tooltip was shown, and then properly removed when the button was removed.
- Code was missing propertly handling of disposal before the tooltip
were shown.
Test Plan: Added test case to the projects/tooltip.ts tests
Reviewers: paulfitz
Reviewed By: paulfitz
Differential Revision: https://phab.getgrist.com/D2797
This commit is contained in:
parent
18268d7838
commit
a9d021af18
@ -174,6 +174,9 @@ export function setHoverTooltip(refElem: Element, tipContent: ITooltipContentFun
|
||||
// If request, re-open on click.
|
||||
dom.onElem(refElem, 'click', () => { close(); open(); });
|
||||
}
|
||||
|
||||
// close tooltip if refElem is disposed
|
||||
dom.onDisposeElem(refElem, close);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user