Open Bug 1873269 Opened 2 years ago Updated 2 years ago

Wrong tab order for input with autocomplete list

Categories

(Core :: Layout: Form Controls, defect)

Firefox 121
defect

Tracking

()

UNCONFIRMED

People

(Reporter: hanno, Unassigned)

Details

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

Steps to reproduce:

(see https://github.com/fellmann/firefox-taborder-bug for code)

Actual results:

The focus jumps to the first input in the first row.

Expected results:

The focus should jump to the second input in the second row.
This is what happens on Chrome and Edge.

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

Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

I'm not yet clear on what's going on, but for what it's worth, WebKit (Safari 17) seems to match Firefox here.

(There's some JS that fires when the inputs gain/lose focus; it's conceivable that this JS is causing us to rebuild part of the frame tree and we're losing track of the focus state, or something? I don't immediately see any changes to display or anything like that in devtools, though.)

Drive-by observation: Repeating step 2 and 3 iterations tell me something stateful is going on here - first iteration lands it on the first input in the first row as expected, but the second iteration lands it on the second input on the first row, etc. Fourth iteration doesn't move the focus because it lands the focus on the first input in the second row.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.