Closed Bug 193373 Opened 22 years ago Closed 22 years ago

HTMLInputElement.focus() seems to have no effect.

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 53579

People

(Reporter: lapsap7+mz, Assigned: jst)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 In a mailing list someone posted the following code. The focus() method seems to have no effect. A bug ? ------- <script language="Javascript" type="text/javascript"> <!-- function window_onLoad() { document.form1.text1.focus(); } function check1 (textObj) { var value; value = textObj.value; if (value != "First" ) { alert("Something wrong, try again!") textObj.select(); textObj.focus(); return false; } return true; } // --> </script> <body onLoad="window_onLoad();"> <form name="form1" id="form1" onsubmit="return check1(document.form1.text1);"> <p>Please enter "First" in first textbox</p> <input type=text id="text1" name="text1" onblur="check1(this)"><br> <input name="text2" id="text2" > </form> </body> Reproducible: Always Steps to Reproduce: I've tested the same code with the latest Mozilla built but still have the same problem.
-> All/All based on testcase in 1.3b/OS X... but haven't looked at the code yet to see what is going on
OS: Windows 2000 → All
Hardware: PC → All
dup of Bug 65581.
*** This bug has been marked as a duplicate of 53579 *** *** This bug has been marked as a duplicate of 53579 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Component: DOM: HTML → DOM: Core & HTML
QA Contact: desale → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: