Closed Bug 1317673 Opened 8 years ago Closed 8 years ago

Link focus on form elements doesn't appear to work properly in Firefox

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 277178

People

(Reporter: cmills, Unassigned)

Details

In the following demo, I've implemented some simple accessible form validation

http://mdn.github.io/learning-area/accessibility/css/form-validation.html

When the inputs are not filled in, an error box is filled in with links that when clicked link to the input element they relate to. For example, the following link would be generated by JS

<a href="#name">name field is empty: fill in your name.</a>

to link to 

<input name="name" id="name" type="text">

to allow the user to link straight through to the input that needs correcting.

This works fine in Chrome, Opera, and Edge/newer IE versions.

In Safari the above only highlights the input, and doesn't actually focus it, but I fixed that using the following:       

anchor.onclick = function() {
  testItem.input.focus();
};

But in Firefox, it just doesn't seem to work properly. Clicking the link seems to put the cursor in a weird position slightly to the bottom left of the input, but you then can't type into it until you explicitly focus it using tab or a mouse click.
I think this is just bug 277178.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.