Closed Bug 297329 Opened 20 years ago Closed 19 years ago

Autocomplete does not work properly when an input field contains an onkeypress event handler

Categories

(Firefox :: Address Bar, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 286933

People

(Reporter: subscriber, Unassigned)

References

()

Details

(Keywords: testcase)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 If auto-complete is turned on, and there is an active onkeypress JavaScript event handler, and auto-coplete displays a drop-down list of items, if the user selects an item by pressing Enter on the keyboard, the keypress appears to be sent to the onkeypress event handler before auto-complete is invoked. If the onkeypress event handler is used to submit a form, this behavior can result in a form being submitted without the user intending to submt the form. Reproducible: Always Steps to Reproduce: 1.Navigate to a Web page that contains a form that contains an edit field with an onkeypress handler that submits the form. 2. enter data into that edit field. 3. submit the form. 4. return to the same page. 5. start typing into the edit field. (auto-complete displays a drop-down list) 6. Use the enter key to select the auto-complete value 7. Note that the form is submitted with the edit field containing the value that the user has typed Actual Results: The form was submitted when enter was pressed to select the auto-complete value. Expected Results: Auto-complete should have "eaten" the keypress. The value should not be passed to the JavaScript onkeypress handler.
Please provide a simple test case.
Summary: Auto-complete does not work properly when an input field contains an onkeypress event handler → Auto-complete does not work properly when an input field contains an onkeypress event handler
(In reply to comment #1) > Please provide a simple test case. Here is a link to a Web page that demonstrates the bug: http://www.popupcop.com/firefoxbug/index.html Please let me know if you need any additional information.
(In reply to comment #1) > Please provide a simple test case. The test case was provided almost a month ago. Could someone please review this bug and either confirm it or reject it. Thanks in advance.
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
I filed Bug #311795 and then found your bug, which looks quite similar. I found that Firefox 1.5b1 fixed my problem but that it's resurfaced in Beta 2. I've found that your bug exists in at least 1.5b2, so I'm voting for it.
Summary: Auto-complete does not work properly when an input field contains an onkeypress event handler → Autocomplete does not work properly when an input field contains an onkeypress event handler
Version: unspecified → 1.5 Branch
Version: 1.5 Branch → Trunk
Flags: blocking1.8rc1?
Flags: blocking1.8.1?
I see this too using URL. Is it a regression? Quite annoying.
not a stop ship bug though.
Flags: blocking1.8rc1? → blocking1.8rc1-
Dup of bug 286933?
Depends on: 286933
Keywords: testcase
*** This bug has been marked as a duplicate of 286933 ***
Status: NEW → RESOLVED
Closed: 19 years ago
No longer depends on: 286933
Flags: blocking1.8.1?
Resolution: --- → DUPLICATE
Verified duplicate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.