If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Tabbing steals focus with javascript textbox.focus()




3 years ago
2 years ago


(Reporter: Debra Elliott, Unassigned)



31 Branch
Windows 7

Firefox Tracking Flags

(Not tracked)





3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140716183446

Steps to reproduce:

http://facltest.org/index.php?option=com_content&view=article&id=4&Itemid=178.  The phone fields demonstrate the bug on this form.  I specifically set javascript element.focus() to come back to the textfield when the phone format is not what's expected.  When tabbing, it doesn't obey this javascript command.  

Actual results:

It put focus on the next tab item (text box) after tabbing.

Expected results:

It should have kept focus on the original text box.  All other browsers do it correctly, except firefox.


3 years ago
Severity: normal → major

Comment 1

3 years ago
What are the exact STR on your page?
Flags: needinfo?(debra.l.elliott)

Comment 2

3 years ago
I'm not sure what you mean by "STR".  The validation is converting phone to (###) ###-#### format.  If you type something less than 10 digits, it will turn the text box red and the focus is directed back to the textbox.  If you hit return in Firefox, this works.  If you hit tab after entry, the box is turned red, but the focus is on the next textbox in the tab order.  This is the part that is not right.  Other browsers make the action after tabbing the same as hitting return.
Flags: needinfo?(debra.l.elliott)

Comment 3

3 years ago
STR = Steps To Reproduce.
It means you have to detail step by step what the user needs to do on that webpage to repro the bug.
But now, I guess, your last comment is enough to repro the bug quickly. I'll try.

Comment 4

3 years ago
I can reproduce this but is it a bug or normal behavior? Tested in IE11 and it behaves the same as Firefox in this regard. Actually, Firefox clears the box when I hit ENTER while IE11 does nothing. Both clear the box and set the focus to the next box when I hit TAB.

Comment 5

3 years ago
My code is specifically (in javascript) telling it to clear the box and then put focus back on it.  If you test with chrome, opera or safari, you will see that they operate in this manner and abide by the focus() command in javascript.  I consider it a bug and confusing that firefox ignores the command to return focus to the text element after a tab but not on a return.  It should be the same as the return/enter action.
Hi Debra,

Are you still having this issue?
Flags: needinfo?(debra.l.elliott)
http://facltest.org/index.php?option=com_content&view=article&id=4&Itemid=178 is dead, so this lacks a testcase
Last Resolved: 2 years ago
Flags: needinfo?(debra.l.elliott)
Keywords: testcase-wanted
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.