Closed
Bug 412839
Opened 18 years ago
Closed 18 years ago
Onchange not fired if onblur modifies text field after user changes it
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 357684
People
(Reporter: grval, Unassigned)
Details
Attachments
(1 file)
|
1.08 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11
Here's some sample code:
<html>
<body>
<script language="javascript">
function lowercase()
{
var myTextField = document.getElementById("myTextField");
myTextField.value = myTextField.value.toLowerCase();
}
function popup()
{
alert('onchange event fired.');
}
</script>
<h2>Firefox OnChange Firing Bug</h2>
<p>Below is a text field. It will change the text to lower case when focus is moved away from the field. It will also tell you
when the onchange event is fired. If you are using Firefox (2.0.0.11, Ubuntu Gutsy), you will notice that the onchange event does not fire when the
text was changed if you used any capital letters.</p>
<form>
<div>
Type in me and change focus (try all lower case, then mixed case):
<input id="myTextField" type="text" onblur="lowercase();" onchange="popup();">
</div>
</form>
<p>I suspect that:
<ul>
<li>there is some logic in Firefox to detect when a field is modified programmatically</li>
<li>the code for that logic has a bug in it which causes it to forget that the field was originally changed by the user</li>
</ul>
</p>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1.cut and paste above HTML into file
2.Navigate Firefox to file
3.Following instructions on loaded page.
Actual Results:
Onchange did not fire if the onblur called a fuction which performed a change on the field, even though the user did change the value of the field.
Expected Results:
Onchange should fire, since user changed value in field.
I have noticed you have had similar bugs in the past, but they were resolved months prior to the last release.
Comment 1•18 years ago
|
||
Works properly in 3.0b3pre, so there's probably a fix that can be backported to the 2.0 branch.
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•