Small issue: the mouse out area from a button is smaller than the mouse in area
A user, Canapin, reported a visual issue where the hover state of a button disappears when the cursor is moved out of the button but still within the entire button area. The button still functions, but the hover effect is lost.
Canapin discovered that the issue occurs because the d-hover class is removed when the cursor leaves the inner area of the button (red area), rather than the entire button area (green area).
Don suggested a CSS solution, adding pointer-events: none to the .d-icon and .d-button-label classes, which resolves the issue. However, Canapin expressed concerns about potential interference with the Discourse interface.
Canapin also found an alternative solution by replacing “mouseenter” with “mouseover” in the Discourse code, which resolves the issue without introducing any immediate problems. However, they are waiting for further review from the developers to confirm whether this is a proper fix.
This doesn’t seem to be an issue .. I think it’s just the hover effect in css that disappears after a few seconds, it’s an animation. Just need to change the css
The effect doesn’t disappear if I keep the mouse cursor on the button.
If the cursor goes inside the green area, the button gets the d-hover class that highlights the entire button, as expected.
But as soon as the cursor leaves the red area (try putting the mouse cursor between “Reply” and the arrow next to it on the left ), the entire button loses its d-hover class. It shouldn’t. The d-hover class should disappear only when the cursor leaves the green area (or if the button isn’t focused anymore).
I think this is something you can change with CSS. From the JS it seems to it is target the button.widget-button and add .d-hover class on mouseenter. But when you move the cursor to the icon and back it goes from the targeted class and removed the .d-hover class. Or something like this