Open Bug 1792016 Opened 3 years ago Updated 3 years ago

Focusout event related target not set appropriately on Mac builds?

Categories

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

Firefox 105
defect

Tracking

()

UNCONFIRMED

People

(Reporter: lal65, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Steps to reproduce:

With the following markup:

<div class="links">
  <a href="#">Link 1</a>
  <a href="#">Link 2</a>
</div>

attach a focusout event listener to .links:

document.querySelector('.links').addEventListener('focusout', e => {
  console.log(e.relatedTarget);
});

now use the keyboard to tab from Link 1 to Link 2

Actual results:

e.relatedTarget is null, but only for the Mac build of Firefox.

Windows, Linux, and Android builds all print out "Link 2" as the related target!

Expected results:

Printing out e.relatedTarget should match the Windows, Linux, and Android behavior.

Version: 105.0b1
Build ID: 20220822142820
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
OS:

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
I think the root cause here might be incorrect. Here's a more complete POC example: ``` ```
Attachment #9295817 - Attachment mime type: text/plain → text/html

As it stands, the two links within the drop-button list are completely keyboard inaccessible out of the box on Mac builds of Firefox. This may have to do with differences in how <button> and <a> elements receive focus on this platform (tab key vs arrow keys).

Sorry for the noise. This is a land of confusion. Updated instructions and example.

Sorry for the noise. This is a land of confusion.

Updated instructions and example.

Attachment #9295822 - Attachment mime type: text/plain → text/html
Component: Widget: Cocoa → DOM: UI Events & Focus Handling
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: