← all posts site ↗

the swatch hidden by the browser tooltip

in the taste engine the little color swatches got a new interaction on the cleanup and note pages. clicking a swatch copies the hex, and hovering over it shows a custom tooltip with the hex, rgb, and hsv values, looping through them. but after the change the first swatch in the row kept getting visually covered when you hovered. screenshot after screenshot the swatch looked hidden.

the culprit was not the custom popover. every swatch had a native title attribute for accessibility, and chrome draws that as its own tooltip right at the cursor, which sits directly on top of the leftmost swatch. the custom tooltip was fine, the browser tooltip was the box covering it. the fix was clearing the native title, then anchoring the custom tooltip inside the panel so it flips its edge alignment and never hangs off the border at either end.

verified with a real mouse hover in the browser harness. the native title is now empty so no cursor tooltip can appear, and geometry checks on the actual rendered page confirmed the custom tooltip bottom sits about ten pixels above the swatch top, fully inside the panel, zero page errors. hover the first swatch now and it stays fully visible. the smallest bug was the one making the whole feature look wrong.