fix(recipes): empêche la sélection de texte native sur les chips/cartes du picker
Les boutons de filtre (catégorie/sous-catégorie/toggles) et les cartes d'ingrédients n'avaient pas user-select: none — un clic qui bouge d'un pixel (clic rapide, trackpad) est alors lu comme un glisser de sélection de texte, et le surlignage natif du navigateur s'affiche à la place de l'état .active attendu. Vu de l'extérieur ça ressemble à un bug de CSS de sélection flaky ; c'est en fait ce surlignage natif qui apparaît par intermittence. Ajouté sur .ingredient-picker (hérité par tous ses boutons enfants), avec un user-select: text explicite ré-appliqué sur le champ de recherche pour ne pas casser le copier/coller dedans. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
d761a3795f
commit
84003d2009
1 changed files with 11 additions and 0 deletions
|
|
@ -689,6 +689,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-sm);
|
gap: var(--space-sm);
|
||||||
|
// Every clickable chip/card below is a plain `<button>` with no text to
|
||||||
|
// actually select — without this, a click that moves even a pixel (a
|
||||||
|
// fast click, a trackpad) is read as a text-selection drag instead, and
|
||||||
|
// the browser's native selection highlight paints over the intended
|
||||||
|
// `.active` state. Reads as "the selection styling is flaky" from the
|
||||||
|
// outside; this is the actual cause, not the `.active` rules themselves.
|
||||||
|
user-select: none;
|
||||||
padding: var(--space-sm);
|
padding: var(--space-sm);
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
|
|
@ -712,6 +719,10 @@
|
||||||
border-radius: var(--radius-base);
|
border-radius: var(--radius-base);
|
||||||
background: var(--color-surface-alt);
|
background: var(--color-surface-alt);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
// Undo the container's `user-select: none` — that rule exists for
|
||||||
|
// the chip/card buttons, not this text input; a search box the user
|
||||||
|
// can't select/copy text from would be its own bug.
|
||||||
|
user-select: text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue