Merge pull request #12776 from overleaf/ae-search-close-tooltip

[cm6] Add tooltip to search panel close button

GitOrigin-RevId: ba7f4ca5d672580054cb6214be94497fd5141730
This commit is contained in:
Alf Eaton 2023-04-28 09:40:37 +01:00 committed by Copybot
parent f3205c1d06
commit c53411ff1d

View file

@ -412,14 +412,16 @@ const CodeMirrorSearchForm: FC = () => {
</div>
<div className="ol-cm-search-form-close">
<button
className="close"
onClick={() => closeSearchPanel(view)}
type="button"
aria-label={t('close')}
>
<span aria-hidden="true">&times;</span>
</button>
<Tooltip id="search-close" description={<>{t('close')} (Esc)</>}>
<button
className="close"
onClick={() => closeSearchPanel(view)}
type="button"
aria-label={t('close')}
>
<span aria-hidden="true">&times;</span>
</button>
</Tooltip>
</div>
</form>
)