Closed Bug 1371 Opened 26 years ago Closed 25 years ago

[GFX TextField]onBlur/focus()

Categories

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

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: rw263, Assigned: rods)

Details

(Whiteboard: [MAKINGTEST] [GFX TextField]webmaster@csoft.qc.ca)

With the below code, the focus() of the textbox is never achieved on a bad value, so onBlur is always true causing a loop. <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; }
Assignee: mccabe → mlm
Component: JavaScript → LibMocha
Thanks for the excellent bug report. I'm going to pass it on to the libMocha component. I can't promise it'll be fixed, because it looks like it's on the mozilla 'classic' codebase - current development efforts are being focused on the nglayout/xpfe codebase.
Status: NEW → ASSIGNED
This may very well still exist in the new code; I will try this soon.
Setting all current Open Critical and Major to M3
Component: LibMocha → JavaScript
Product: MozillaClassic → Browser
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
DOM bugs are not my problem.
Assignee: mlm → joki
Status: ASSIGNED → NEW
Tom, Would you see if this is also a 5.0 bug. Then pass it to dprice for libmocha. Thanks, = C =
QA Contact: 4015 → 3847
QA contact re-assigned according to the product areas we're currently working on.
Target Milestone: M3
moving off the m3 list.
Component: JavaScript → DOM Level 0
Moving to DOM Level 0 component. Move to DOM Level 1 if that is more correct.
Whiteboard: [MAKINGTEST] webmaster@csoft.qc.ca
Assignee: joki → rods
Whiteboard: [MAKINGTEST] webmaster@csoft.qc.ca → [MAKINGTEST] [GFX TextField]webmaster@csoft.qc.ca
added to status white board, this is a GFX text field issue
Summary: onBlur/focus() → [GFX TextField]onBlur/focus()
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed
QA Contact: janc → desale
Status: RESOLVED → VERIFIED
Verified with 12-14-09.
URL: n/a
You need to log in before you can comment on or make changes to this bug.