Closed Bug 293537 Opened 19 years ago Closed 16 years ago

focus() command goes to next field in Mozilla

Categories

(SeaMonkey :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 53579

People

(Reporter: bruce.terry, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319

A javascript script upon error returns focus to the field containing the error.
 This works in IE.  In Mozilla it returns focus to the following field.  On the
test URL <http://bible.ovc.edu/bible/chlookform.htm> try entering an at-sign (@)
in the username field of the email address.  After getting the error alert,
focus goes to the next field in Mozilla.

Reproducible: Always

Steps to Reproduce:
1. Go to http://bible.ovc.edu/bible/chlookform.htm
2. Enter user@ in the username field of the email address
3. Hit tab

Actual Results:  
Focus goes to the next field.

Expected Results:  
Focus should return to the field with the error and stay there so the user can
correct the error.
Product=Rhino has nothing to do with Mozilla application in particular or
JavaScript implementation in Mozilla-based browsers.
Component: Core → General
Product: Rhino → Mozilla Application Suite
Version: other → 1.7 Branch
Assignee: igor → general
QA Contact: core → general
INVALID
Pressing Enter starts submitting the form, and the scripts that checks the form
specifically set the focus to the e-mail fields.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Oops!  I change the form chlookform.htm to provide greater spam protection and
forgot that it was being used to test Mozilla.  I have set up a new form at
<http://bible.ovu.edu/bible/mozitest.htm> that is only for testing Mozilla. 
This form works correctly in MS-IE and Opera, but not in Mozilla.

Here is the corrected information.

A javascript script upon error returns focus to the field containing the error.
 This works in IE.  In Mozilla it returns focus to the following field.  On the
test URL <http://bible.ovu.edu/bible/mozitest.htm> try entering an at-sign (@)
in the username field of the email address.  After getting the error alert,
focus goes to the next field in Mozilla.

Reproducible: Always

Steps to Reproduce:
1. Go to http://bible.ovu.edu/bible/mozitest.htm
2. Enter user@ in the username field of the email address
3. Hit tab

Actual Results:  
Focus goes to the next field after the OK button is pushed.

Expected Results:  
Focus should return to the field with the error and stay there so the user can
correct the error.

Status: RESOLVED → REOPENED
Resolution: INVALID → ---
I believe this is a dupe of bug 53579
[Microsoft Internet Explorer, version 6.0.2800.1106 (128b, SP1)] (release++) (W2Ksp4)

No bug.

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.13) Gecko/20060414] (release) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070515 SeaMonkey/1.5a] (nightly) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008051002 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

Confirming, on Trunk:

1. Load <http://bible.ovu.edu/bible/mozitest.htm>.
2. Click in the email field.
3. Click in the username field.
3r1. (get the |validate()| error dialog.)
3r2. Focus is where clicked: not returned to the email field.

***

(In reply to comment #4)
> I believe this is a dupe of bug 53579

Yes:
using |setTimeout("document.forms[0].required_email.focus()", 0);| fixes the testcase page.
Status: REOPENED → RESOLVED
Closed: 18 years ago16 years ago
Resolution: --- → DUPLICATE
Version: 1.7 Branch → Trunk
You need to log in before you can comment on or make changes to this bug.