compose: Only transition when low-attention row hovered.

Previously, if the mouse cursor were in the vicinity of
the compose box, we'd see transitions even on keyboard
interactions, which should not have been happening.

This also allows instantaneous highlighting for keyboard
users, as well as avoiding any transitions when a
mouse user clicks into a recipient-row element (at
which point the hover transitions will have already
run).
This commit is contained in:
Karl Stolley
2025-08-29 14:16:21 -05:00
committed by Tim Abbott
parent 2fce6fa317
commit de7419a528

View File

@@ -1241,9 +1241,10 @@ textarea.new_message_textarea {
the mouse, once the compose box is open. Any keyboard
interactions (e.g., Shift-Tabbing from the compose textarea
to the topic box) show instant changes, so we don't need to
accommodate them here. */
#compose.compose-box-open:hover {
.low-attention-recipient-row {
accommodate them here, which we prevent by applying the
transitions only when focus isn't within the recipient row. */
#compose.compose-box-open {
.low-attention-recipient-row:hover:not(:focus-within) {
#compose_select_recipient_widget,
#compose_recipient_box,
#compose-direct-recipient .pill-container {