Closed Bug 430929 Opened 16 years ago Closed 16 years ago

choosing from autocomplete list doesn't fire input event

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 320462

People

(Reporter: naktinis, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5

The Web Forms 2.0 specification (http://www.whatwg.org/specs/web-forms/current-work/#the-change) says: "This [input] event must be fired on a control whenever the value of the control changes due to input from the user".

And I think that choosing an item from an autocomplete list is an input from the user, because user, by choosing from the list, tells the browser: "I want to change the value of the input field using the content I just chose".

This would be convenient for various incremental search UIs and other cases when page should know about the change immediately. By the way it seems that no event is fired at all when user selects from the autocomplete list. Is it true?

There was a similar bug report on earlier version of firefox. Also, this example states that it worked in FF 1.0.7. It means it is a regression. https://bugzilla.mozilla.org/attachment.cgi?id=206034

Reproducible: Always

Steps to Reproduce:
1. Generate an autocomplete list on an input item.
2. Choose the item.
3. Input event does not fire.
Actual Results:  
The input event did not fire.

Expected Results:  
Input should have fired because I told the browser to change the value of the field.

A simple testcase:

<div id='information'></div>
<input type="text" name="name" oninput="document.getElementById('information').innerHTML += 'changed '">
<input type="password" name="password" oninput="document.getElementById('information').innerHTML += 'changed '">
<button>submit</button>
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.