Closed Bug 359387 Opened 18 years ago Closed 17 years ago

onChange event is not launched if input has been changed with form field history (autocomplete)

Categories

(Toolkit :: Autocomplete, defect)

1.8 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 388558

People

(Reporter: thomasdesvenain, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0

onChange event is not launched if input has been changed with form field history (when i chose the field value in the history with mouse or keyboard arrows)

Reproducible: Always

Steps to Reproduce:
1. write a form with something like "<input type="text" onChange="alert('it works !');" />
2. try this form few times completing the field with keyboard
3. try this form completingto complete the field with history

Actual Results:  
on change event is not launched

Expected Results:  
i expect that it would be launched
Still present with the latest nightly build of Minefield:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061109 Minefield/3.0a1
Confirming this. And it's a regression from Firefox 1.5. A commenter in #firefox reported it in Linux as well.

Severity: major → normal
Status: UNCONFIRMED → NEW
Component: General → Autocomplete
Ever confirmed: true
Keywords: regression
OS: Windows XP → All
Product: Firefox → Toolkit
QA Contact: general → autocomplete
Version: unspecified → 1.8 Branch
Summary: onChange event is not launched if input has been changed with form field history → onChange event is not launched if input has been changed with form field history (autocomplete)
*** Bug 354697 has been marked as a duplicate of this bug. ***
Flags: blocking1.9?
I've opened Bug 363359,which is a duplicated bug of this one.

Here is my description and steps to reproduce it:

Bug description:
================
When using the browser's Auto Complete function, setting one of the suggested
values and losing focus, the browser doesn't catch the OnChange event.
This worked fine in Firefox versions < 2.0 before.

Where you can see the problem:
====================================
I have this simple HTML page at: http://gurarie.org/x1.html

This page has a text filed which has OnChange attibute which supposed to popup
JavaSCript alert when the value of the text field has changed.

The page HTML is:
----------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">

<head>
        <title>test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<body>
<div>
<form action="x1.html" method="get">
        <p>
                <input type="text" name="txt" value="" size="25"
onchange="alert(this.value);" />
        </p>
        <p>
                <input type="button" name="a" value="test" />
                &nbsp;
                <input type="submit" name="submit" value="Submit" />
        </p>
</form>
</div>

</body>
</html>

Reproducible: Always

Steps to Reproduce:
1). Goto: http://gurarie.org/x1.html
2). Set the value dddd in the text filed and click the submit button.
3). A JavaScript alert will be shown with the value "dddd", click OK and then
click submit again (without changing the value).
4). You will be redirected again to this page, double click on the text filed
and use the browser auto complete to show dddd, select it and click the "test"
button.

Actual Results:  
Nothing happens

Expected Results:  
The browser should display JavaScript alert dialog with the "dddd" value that
was selected from the borwser's auto complete box.
This bug makes me sad....i rely on the onChange event for text boxes to pre-load remaining elements of forms.  Now, i'm going to have to go back to using things like buttons and "onClicking".  ...again, very sad:(
Attached file Reproduces this bug
Regression Range on trunk
2006070504 works
2006070604 fails

Bonsai checkin list doesn't bring any obvious results to me.
This bug also affects 1.8.1.x on a post-branch checkin. Should I search that regression range also?
Well, I was going to post this bug, but meanwhile found out I'm not the only one complaining.
And, this bug is already 2 years old and isn't even assigned?!
It seams to me that this one is a little to serious for getting by... The way I see it, it means Firefox offers a way to change fields without triggering "onchange" events. That renders them rather useless, doesn't it?

Maybe stopping adding new features and start fixing the "classic" bugs isn't such a bad idea...

That said, keep up the great work :-)
The patch in bug 388558 (which is a dup of this one, I think) fixes the problem.
Status: NEW → RESOLVED
Closed: 17 years ago
No longer depends on: 388558
Flags: blocking1.9?
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: