diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index 8ab21bda0ad..2ac4e25a7b6 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2024-05-29] - v1.120.1 + + +### Fixed: + +- Tooltip not closing when unhovered ([#10523](https://github.com/linode/manager/pull/10523)) + ## [2024-05-28] - v1.120.0 diff --git a/packages/manager/package.json b/packages/manager/package.json index 8d130cfd0ba..1b6e5bf0ea2 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -2,7 +2,7 @@ "name": "linode-manager", "author": "Linode", "description": "The Linode Manager website", - "version": "1.120.0", + "version": "1.120.1", "private": true, "type": "module", "bugs": { diff --git a/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx b/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx index 7a44e14538e..849a034e535 100644 --- a/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx +++ b/packages/manager/src/components/TextTooltip/TextTooltip.test.tsx @@ -1,4 +1,4 @@ -import { fireEvent } from '@testing-library/react'; +import { fireEvent, waitFor } from '@testing-library/react'; import React from 'react'; import { renderWithTheme } from 'src/utilities/testHelpers'; @@ -59,4 +59,25 @@ describe('TextTooltip', () => { expect(displayText).toHaveStyle('color: rgb(54, 131, 220)'); expect(displayText).toHaveStyle('font-size: 18px'); }); + + it('the tooltip should disappear on mouseout', async () => { + const props = { + displayText: 'Hover me', + tooltipText: 'This is a tooltip', + }; + + const { findByRole, getByText, queryByRole } = renderWithTheme( + + ); + + fireEvent.mouseEnter(getByText(props.displayText)); + + const tooltip = await findByRole('tooltip'); + + expect(tooltip).toBeInTheDocument(); + + fireEvent.mouseLeave(getByText(props.displayText)); + + await waitFor(() => expect(queryByRole('tooltip')).not.toBeInTheDocument()); + }); }); diff --git a/packages/manager/src/components/TextTooltip/TextTooltip.tsx b/packages/manager/src/components/TextTooltip/TextTooltip.tsx index 7c49761865f..e480ea3f0c6 100644 --- a/packages/manager/src/components/TextTooltip/TextTooltip.tsx +++ b/packages/manager/src/components/TextTooltip/TextTooltip.tsx @@ -66,7 +66,6 @@ export const TextTooltip = (props: TextTooltipProps) => { }, }, }} - leaveDelay={500000} data-qa-tooltip={dataQaTooltip} enterTouchDelay={0} placement={placement ? placement : 'bottom'}