compose: Show tooltip instantly for a .disabled-on-hover button.

We have some delay for tooltips for all compose buttons, but we now show
tooltips instantly for buttons that are disabled on hover, to emphasize
that the button is disabled, and why.
This commit is contained in:
N-Shar-ma
2023-11-25 12:33:08 +05:30
committed by Tim Abbott
parent ab3650343f
commit 15b3ad7466
2 changed files with 12 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ function get_tooltip_content(reference: Element): string | Element | DocumentFra
// transition, while the "long" version is intended for elements where
// we want to avoid distracting the user with the tooltip
// unnecessarily.
const INSTANT_HOVER_DELAY: [number, number] = [100, 20];
export const INSTANT_HOVER_DELAY: [number, number] = [100, 20];
// INTERACTIVE_HOVER_DELAY is for elements like the emoji reactions, where
// the tooltip includes useful information (who reacted?), but that
// needs a short delay for users who are just tapping a reaction