web/satellite: dismiss access grant modal tooltip

This change fixes an issue where the tooltip on the create access grant
modal will not dismiss even after hovering/clicking outside of it.

Issue: https://github.com/storj/storj/issues/5502

Change-Id: Ib6c042f3b18566bfeb4b05cb50acfa5e5ca1fbb9
This commit is contained in:
Wilfred Asomani 2023-02-01 15:14:52 +00:00 committed by Storj Robot
parent b4dbfa0cf8
commit e751ee3c1b

View File

@ -373,15 +373,15 @@ function toggleTooltipHover(type, action): void {
if (tooltipHover.value === '' && action === 'over') { if (tooltipHover.value === '' && action === 'over') {
tooltipHover.value = type; tooltipHover.value = type;
return; return;
} else if (tooltipHover === type && action === 'leave') { } else if (tooltipHover.value === type && action === 'leave') {
tooltipVisibilityTimer.value = setTimeout(() => { tooltipVisibilityTimer.value = setTimeout(() => {
tooltipHover.value = ''; tooltipHover.value = '';
},750); }, 750);
return; return;
} else if (tooltipHover.value === type && action === 'over') { } else if (tooltipHover.value === type && action === 'over') {
tooltipVisibilityTimer.value && clearTimeout(tooltipVisibilityTimer.value); tooltipVisibilityTimer.value && clearTimeout(tooltipVisibilityTimer.value);
return; return;
} else if (tooltipHover !== type) { } else if (tooltipHover.value !== type) {
tooltipVisibilityTimer.value && clearTimeout(tooltipVisibilityTimer.value); tooltipVisibilityTimer.value && clearTimeout(tooltipVisibilityTimer.value);
tooltipHover.value = type; tooltipHover.value = type;
} }