Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

50% Positive

Analyzed from 339 words in the discussion.

Trending Topics

#https#tooltips#example#hysteresis#element#mouse#don#more#menus#css

Discussion (14 Comments)Read Original on HackerNews

brixie•about 1 hour ago
This looks it's describing the same technique as the last example in https://emilkowal.ski/ui/you-dont-need-animations (and that whole post is worth a read, I think, if you found this interesting).

It's such a small detail that I wouldn't have otherwise noticed (because I don't build animations, so it doesn't cross my mind), but now that I know about it, I think about it all the time.

hurrell•about 2 hours ago
I think I would describe this as an example of hysteresis. Neat! https://en.wikipedia.org/wiki/Hysteresis
xg15•about 2 hours ago
Interestingly, there are more use cases for hysteresis in UI design, e.g. it was famously used in nested menus in Windows: https://www.mackido.com/Interface/hysteresis.html

I think there was also an article about it on The Old New Thing, but I can't seem to find it anymore.

phyzome•about 4 hours ago
I ran into the same problem about 20 years ago when implementing hover-based dropdown menus on a website. It was only about 10 lines of JS and a couple global variables but I was the only person who understood it. :-P

(These days I would have included more comments.)

Naturally, there was a fallback to pure CSS menus, because we weren't barbarians.

compiler-guy•about 4 hours ago
I greatly appreciate this attention to detail, and there isn't enough of this in the world. For example, in Visual Studio popups on hover happen so fast you can barely select anything, or you end up clicking on the popup instead of selecting a word.
gblargg•about 3 hours ago
Opus Magnum suffers from this. It feels like punishment for taking the most direct route to get the cursor where I want it.
wang_li•about 3 hours ago
If there is a primary UI element on screen that the user can interact with and moving the mouse towards that causes a secondary, alternative, UI element to appear, the second element needs an active modifier key to bring it up. Tooltips and such are total trash and get in the way of usability. If you have something important then put it on the screen to begin with don't have it randomly jump in front of the user who is already mid action with something else.
goda90•about 1 hour ago
What about using mouse velocity? If the mouse is changing position at a certain rate, don't show the tooltips.
jareklupinski•about 1 hour ago
i only show tooltips if you wiggle the mouse cursor over an element
nayroclade•about 3 hours ago
Chris Coyier also posted a version using only HTML/CSS, no JS: https://blog.master.dev/delayed-then-instant-tooltips-with-h...
jay_kyburz•about 1 hour ago
Perhaps I'm just an old grump, but I prefer the No Delay version in the example.

I like predictable, consistent, and fast.

halostatue•about 3 hours ago
The pure CSS version seems more interesting to me: https://blog.master.dev/delayed-then-instant-tooltips-with-h...