If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

focus does not fire on click for <button> elements on Mac

RESOLVED WONTFIX

Status

()

Core
Event Handling
RESOLVED WONTFIX
2 years ago
2 years ago

People

(Reporter: Tyler, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: btpp-followup-2016-02-25, URL)

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822

Steps to reproduce:

On Firefox 44.0.2 on Macintosh OSX, clicking a <button> element does not fire onfocus.

Repro:
https://jsfiddle.net/bkp1c9cw/

This is documented a little here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus


Actual results:

Nothing happened. Tabbing still worked


Expected results:

The :focus should have been applied and the element's styles changed.
(Reporter)

Updated

2 years ago
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86

Updated

2 years ago
Component: Untriaged → Event Handling
Product: Firefox → Core
I think this behavior is intentional on OSX, to be compatible with how native buttons work
on that platform.

Does Safari make a button match :focus after you click on it?
Flags: needinfo?(hibbard.tyler)
Whiteboard: btpp-followup-2016-02-25
(In reply to Mats Palmgren (:mats) from comment #1)
> Does Safari make a button match :focus after you click on it?

I tested this in Safari 8.0.8 on OSX and the answer is no.

Clicking a button doesn't focus it on OSX, so it shouldn't match :focus
nor fire focus events.  We're compatible with Safari in this regard.
I'm resolving this as Wontfix since our current behavior is intentionally
following platform conventions on OSX.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(hibbard.tyler)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.