Closed
Bug 1371
Opened 26 years ago
Closed 25 years ago
[GFX TextField]onBlur/focus()
Categories
(Core :: DOM: Core & HTML, defect, P1)
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;
}
Updated•26 years ago
|
Assignee: mccabe → mlm
Component: JavaScript → LibMocha
Comment 1•26 years ago
|
||
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.
Updated•26 years ago
|
Component: LibMocha → JavaScript
Product: MozillaClassic → Browser
Comment 4•26 years ago
|
||
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Tom,
Would you see if this is also a 5.0 bug. Then pass it to dprice for libmocha.
Thanks,
= C =
QA contact re-assigned according to the product areas we're currently working
on.
Updated•26 years ago
|
Target Milestone: M3
Comment 8•26 years ago
|
||
moving off the m3 list.
Moving to DOM Level 0 component. Move to DOM Level 1 if that is more correct.
Assignee | ||
Updated•25 years ago
|
Assignee: joki → rods
Assignee | ||
Updated•25 years ago
|
Whiteboard: [MAKINGTEST] webmaster@csoft.qc.ca → [MAKINGTEST] [GFX TextField]webmaster@csoft.qc.ca
Assignee | ||
Comment 10•25 years ago
|
||
added to status white board, this is a GFX text field issue
Assignee | ||
Updated•25 years ago
|
Summary: onBlur/focus() → [GFX TextField]onBlur/focus()
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•25 years ago
|
||
Fixed
Updated•25 years ago
|
QA Contact: janc → desale
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 12•25 years ago
|
||
Verified with 12-14-09.
You need to log in
before you can comment on or make changes to this bug.
Description
•