Fixed RegExp problems in forceInteger method , implemented JS for text and background color buttons relating to bug 21410 (but blocked by bug 23739). Fixed bug 18707. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@57568 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -367,19 +367,16 @@ function forceInteger(elementID)
|
||||
return;
|
||||
|
||||
var stringIn = editField.value;
|
||||
var pat = new RegExp("/\D+/g");
|
||||
if (pat.test(stringIn)) {
|
||||
dump("TEST SUCCEEDED\n")
|
||||
editField.value = stringIn.replace(pat,"");
|
||||
if (stringIn && stringIn.length > 0)
|
||||
{
|
||||
// Strip out all nonnumeric characters
|
||||
editField.value = stringIn.replace(/\D+/g,"");
|
||||
|
||||
// we hope to remove the following line for blur() once xp widgets land
|
||||
// cmanske (9/15) testing this now that GFX ender widget is active
|
||||
//editField.blur();
|
||||
sysBeep.Beep();
|
||||
}
|
||||
else {
|
||||
dump("TEST didn't SUCCEEDED\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user