A hash-link must focus the anchor input

NEW
Unassigned

Status

()

P2
normal
7 months ago
6 months ago

People

(Reporter: xaviermd, Unassigned)

Tracking

63 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 months ago
Posted file test-focus-on-label.html (obsolete) —
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0
Build ID: 20180815225731

Steps to reproduce:

Clicked on a link that target an anchored <input> in the same page


Actual results:

<input> didn't get the focus


Expected results:

<input should have get the focus, for accessibilty reasons.

Tested and failed on Firefox android 61 and 63. 
Tested and passed on Chrome.
(Reporter)

Comment 1

7 months ago
You don't need the JS part for the moment, it's a future enhancement proposal ;)
Attachment #9001936 - Attachment is obsolete: true

Comment 2

7 months ago
I was able to reproduce this issue in the latest Nightly build.

Build ID 	20180822100104
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Product: Firefox → Core
Olli, do you know who might be able to triage this?
Flags: needinfo?(bugs)
Priority: -- → P2

Comment 4

6 months ago
Just to clarify that this also doesn't work with a textarea.
So Chrome is inconsistent with label handling.

We seem to be dealing with <a> elements only, and just move selection there
https://searchfox.org/mozilla-central/rev/6ddb5fb144993fb5de044e2e8d900d7643b98a4d/layout/base/PresShell.cpp#3228
Flags: needinfo?(bugs)

Updated

6 months ago
Component: DOM: Events → Document Navigation
You need to log in before you can comment on or make changes to this bug.