Closed Bug 200065 Opened 22 years ago Closed 22 years ago

The bug # 1371 exists for the operating system OS/2

Categories

(SeaMonkey :: General, defect)

x86
OS/2
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 53579

People

(Reporter: ashok_gce, Assigned: asa)

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Build Identifier: Mozilla/5.0 (os/2; U; Warp 4.5; en-US; rv:1.2a) I am trying to validate an entry in the onBlur event of a textBox and if it is not a valid entry, I want to give an alert message and set the focus back to the same textBox. Alert message appears, but the focus is not setback to it. You can have the same example of the bug # 1371. But here the operating system differs(OS/2). Example : <input type=text name=filename value="" onBlur="validateFileEntry(this.value, this)"> function validateFileEntry(validString, field) { var isCharValid = true; var i, invalidChar; for (i=0; i<validString.length; i++) { if (validString.charAt(0) == '.') { isCharValid = false; i = validString.length; } if (validateCharacter(validString.charAt(i)) == false) { isCharValid = false; invalidChar = validString.charAt(i); i = validString.length; } } if (i < 1) { return false; } if (isCharValid == false) { if (invalidChar) alert("Invalid filename. Can't contain '" + invalid+ "'."); else alert('Invalid filename.'); if (field) { field.focus(); field.select(); } return false; } return true; } function validateCharacter(character) { if ((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z') || (character >= '0' && character <= '9') || (character =='-') || (character == '.') || (character == '_')) return true; else return false; } Reproducible: Always Steps to Reproduce: 1.Enter . in the input field and tabout. Actual Results: ALert message appears saying, invalid file. Then the focus is moving to address bar. Expected Results: After alert message Focus should setback to the input field.
OS: other → OS/2
*** This bug has been marked as a duplicate of 53579 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.