Closed Bug 1669066 Opened 4 years ago Closed 4 years ago

button:active state is not being triggered on spacebar press

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 81
defect

Tracking

()

RESOLVED DUPLICATE of bug 68851

People

(Reporter: katherine.deibel, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

I created the following codepen: https://codepen.io/metageek/pen/gOrVzba
that contains buttons with distinct focus (dark blue background), hover (green box shadow), and active (yellow text on purple background and dotted red outline) states. An output log shows keydown events and click events on the button (newest message at top).

Actual results:

button:active state is triggered correctly when a button is clicked by a mouse. No active state is seen when a focus button is triggered by the spacebar.

Expected results:

On a spacebar keydown event, the active state should have been shown and should have stayed active as long as the key remain pressed. This is a visual affordance to know that the button was clicked.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.