Closed Bug 1599415 Opened 8 months ago Closed 2 months ago

Firefox macOS is doesn't trigger focus event when someone uses mouse to click a details summary

Categories

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

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox78 --- fixed

People

(Reporter: lauri.eskola, Assigned: keithamus)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

Steps to reproduce:

Please note that this problem is only with the macOS version of Firefox. It works fine on Windows and Linux (Ubuntu).

When a details summary is clicked with a mouse, the focus effect is not visible. If I use <Tab> key to navigate then the focus effect is visible. Here is an example:

https://jsfiddle.net/lauriii/9t64fjap/

Actual results:

The focus is moved on the details summary but the focus effect is not visible, whereas it most likely should have been. The focus effect is visible in Windows/Linux version, as well as other major browsers on macOS such as Safari and Chrome.

Expected results:

The focus should be moved on the details summary and the focus effect should be visible when clicking a details summary.

I just realized this problem is wider than just the focus effect. It seems like the focus event isn't triggered at all when details summary is clicked with a mouse on macOS version of Firefox: https://jsfiddle.net/lauriii/9t64fjap/1/

Summary: Firefox macOS is missing focus effect when someone uses mouse to click a details summary → Firefox macOS is doesn't trigger focus event when someone uses mouse to click a details summary

Hi Lauri,

I can reproduce this using Firefox 70.0.1 and Firefox Nightly 72.0a1 on MacOS 10.15 and Windows 10 as well.
I will set a component in order to involve the development team in reviewing this issue.

Thank you for reporting!

Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: UI Events & Focus Handling
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Version: 70 Branch → Trunk

Mac has different focus handling in general, and Firefox tries to follow OS conventions.

Lauri, is this a regression or has the behavior been the same in older versions of Firefox?

Flags: needinfo?(lauri.eskola)
Priority: -- → P3

(In reply to Olli Pettay [:smaug] from comment #3)

Mac has different focus handling in general, and Firefox tries to follow OS conventions.

Lauri, is this a regression or has the behavior been the same in older versions of Firefox?

It doesn't look like an OS convention because Safari and Chrome on macOS both trigger focus event on when details summary is clicked with a pointer device.

I could reproduce this problem with Firefox 49.0 which according to MDN was the first Firefox release to support details. Therefore I don't believe this would be a regression.

Flags: needinfo?(lauri.eskola)

(Chrome doesn't follow OS conventions on MacOS)

Thanks for testing.

Assignee: nobody → keithamus
Attachment #9143553 - Attachment description: Bug 1599415 trigger `focus` when details summary element is clicked → Bug 1599415 trigger `focus` when details summary element is clicked r?TYLin
Status: NEW → ASSIGNED

Patch failed to land.
" Details: We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

applying /tmp/tmpTkvc5x
widget/gtk/mozcontainer.cpp
Hunk #9 FAILED at 595.
1 out of 15 hunks FAILED -- saving rejects to file widget/gtk/mozcontainer.cpp.rej
abort: patch command failed: exited with status 256 "

Flags: needinfo?(keithamus)
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1ea874b6ead8
trigger `focus` when details summary element is clicked r=TYLin,smaug

I reland the patch via Lando.

Flags: needinfo?(keithamus)
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/23428 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.