diff --git a/apps/client/src/widgets/note_icon.tsx b/apps/client/src/widgets/note_icon.tsx index 7ce5e020f7..ae5867f458 100644 --- a/apps/client/src/widgets/note_icon.tsx +++ b/apps/client/src/widgets/note_icon.tsx @@ -13,7 +13,7 @@ import ActionButton from "./react/ActionButton"; import Dropdown from "./react/Dropdown"; import { FormDropdownDivider, FormListItem } from "./react/FormList"; import FormTextBox from "./react/FormTextBox"; -import { useNoteContext, useNoteLabel } from "./react/hooks"; +import { useNoteContext, useNoteLabel, useStaticTooltip } from "./react/hooks"; interface IconToCountCache { iconClassToCountMap: Record; @@ -58,9 +58,16 @@ function NoteIconList({ note, dropdownRef }: { dropdownRef: RefObject; }) { const searchBoxRef = useRef(null); + const iconListRef = useRef(null); const [ search, setSearch ] = useState(); const [ iconData, setIconData ] = useState(); const [ filterByPrefix, setFilterByPrefix ] = useState(null); + useStaticTooltip(iconListRef, { + selector: "span", + customClass: "pre-wrap-text", + animation: false, + title() { return this.getAttribute("title") || ""; }, + }); useEffect(() => { async function loadIcons() { @@ -152,6 +159,7 @@ function NoteIconList({ note, dropdownRef }: {
{ // Make sure we are not clicking on something else than a button. const clickedTarget = e.target as HTMLElement;