Closed Bug 342342 Opened 19 years ago Closed 19 years ago

Autocomplete onkeypress keyCode=13 causes form submit, js exception nsIAutoCompletePopup::selectedIndex, NS_ERROR_XPC_JS_THREW_STRING, on Sirius.com

Categories

(Toolkit :: Form Manager, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 286933

People

(Reporter: bugz-moz, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060620 Firefox/1.5.0.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060620 Firefox/1.5.0.5 May be Evangelism, Mozilla differs from IE behavior. URL requires password so I will attach a simplified test case. The page uses onkeypress (of input fields) to capture Enter keyCode=13 and submit the form. If you use Down Arrow and the Enter key to select an item from an Autocomplete drop-down, then the Javascript is triggered and submits the form right away. A workaround is to use the mouse to click on the drop-down selection. IE does not do this. But all versions of Firefox I tried do: current 1.5.0.5 nightly, old versions like 1.0.7, and trunk Minefield nightly, all with a fresh profile. Throws this Exception to the JS console, *if* you use my simplified test case: Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame... If you use the actual Sirius.com URL, the JS console just shows a bunch of document.all-should-be-getElementById warnings instead. The most relevant open bug I see is Bug 261423. Fixed Bug 236791 shows "focus()" throwing the same exception. Importance of this bug is heightened because it causes havoc on a payment page. (A poorly designed one.) Reproducible: Always Steps to Reproduce: 1. Populate Autocomplete for one of the text inputs. 2. Use Down Arrow and the Enter key to select an item from the Autocomplete drop-down list. Actual Results: Javascript triggers form submit or, in simplified test case, an alert and exception. Expected Results: Automplete fills the text input.
Attached file Simplified test case. (deleted) —
I think this is a duplicate of bug 286933, not?
Yes, it is a dupe. I keyed my bug searching too much on the exception. If you think the exception is any help, maybe it should be noted in the other bug. Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame... Thanks... *** This bug has been marked as a duplicate of 286933 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: