Closed
Bug 193373
Opened 22 years ago
Closed 22 years ago
HTMLInputElement.focus() seems to have no effect.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: lapsap7+mz, Assigned: jst)
Details
Attachments
(1 file)
722 bytes,
text/html
|
Details |
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.
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
-> 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
Comment 4•22 years ago
|
||
*** 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
You need to log in
before you can comment on or make changes to this bug.
Description
•