Repository navigation
Stop bar chart tooltips from blinking when hovering the value label - #1334
Merged
Merged
Conversation
The tooltip's arrow (a transparent 18 px ::after box) reached about 10 px into the top of the hovered bar, where the value label sits. Once the tooltip appeared it covered the pointer, the bar got mouseleave, the tooltip was hidden 500 ms later, and the next mouseenter brought it back: a blink about once a second. The tooltip is display only, so let pointer events pass through it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
🔧 PR Build ArtifactsVersion: All environments built successfully. Download the zip files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Reported in #1270 (v2.6.0-rc2, Chrome/Opera on Windows and Firefox on Linux): resting the pointer on the top part of a bar, where the value label sits, makes the tooltip blink on and off about once a second. It happens on every bar chart, including Future energy price.
The tooltip is placed 10 px above the hovered bar, but its arrow is a
::afterbox drawn with a 9 px border, 18 px tall, whose lower (transparent) half still takes pointer events. It reaches about 10 px into the top of the bar. Once the tooltip appears it is under the pointer, so the bar getsmouseleave, the tooltip is hidden after 500 ms, the pointer is over the bar again,mouseentershows it after another 500 ms, and so on.Change
pointer-events: noneon.tooltip(inherited by the arrow). The tooltip only shows text, so nothing is lost.ui/dist/index.cssrebuilt;index.jsis unchanged.Verification
Local Vite dev server proxied to a real ESP32-S2 device running v2.6.0. A headless Chrome script (puppeteer) moved the pointer onto the value label of the tallest bar in each chart and sampled whether a tooltip was present every 100 ms for 4 s (
#= shown,.= not):Before (the device's own v2.6.0 UI, and the dev server with the old
pointer-eventsforced back):After:
Same result for Voltage, Amperage, Tariff peaks, Energy use last 24 hours and last 31 days. Not tested on a touch device; tap goes through the same
clickhandler on the bar, which this does not touch.Refs #1270
🤖 Generated with Claude Code