Open Bug 658296 Opened 13 years ago Updated 2 years ago

on input tag javascript call back is slow if style contain border color

Categories

(Firefox :: General, defect)

4.0 Branch
x86
Windows Vista
defect

Tracking

()

UNCONFIRMED

People

(Reporter: utile, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

on input tag javascript call back is slow if style contain border color
slow:<input type="text" value="" name="carpo[]" onkeydown="nodb(\'carpot\')" style="border-color: #ddd #ddd #ddd #ddd;">
fast:<input type="text" value="" name="carpo[]" onkeydown="nodb(\'carpot\')">

Reproducible: Always

Steps to Reproduce:
1.get the supply php code
2.on top of code set $slow=true;
3.load the page generated by the php code
4.on one of the input field press a key

Actual Results:  
after 1 to 2 seconds the background of the page goes green 

Expected Results:  
1. change on top of the php code set $slow=false;
2.load the page generated by the php code
4.on one of the input field press a key
after no perceptble time the background of the page goes green 

<?Php
$slow=true;
?>
<script type="text/javascript">
function nodb(id)
{
  obj = document.getElementById(id);
  obj.style.backgroundColor ="#9e9";
}
</script>
<?Php
$maxcol=8;
$maxrow=15;
if($slow)
{
  $inp='<input type="text" value="" name="carpo[]" onkeydown="nodb(\'carpot\')" style="border-color: #ddd #ddd #ddd #ddd;">';
}
else
{
  $inp='<input type="text" value="" name="carpo[]" onkeydown="nodb(\'carpot\')"">';
}

echo'<div id ="carpot">';
for($r=0; $r<$maxrow; $r++)
{
  echo'<p>';
  for($c=0; $c<$maxcol; $c++)
  {
    echo''.$inp.'';
  }
  echo'</p>';
}
echo'</div>';
?>
Version: unspecified → 4.0 Branch
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.