Closed Bug 298423 Opened 16 years ago Closed 16 years ago

Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMEventTarget.dispatchEvent]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: masayuki, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

We cannot use dispatchEvent in Javascript(see testcase).
I think that it is regression of bug 296704.
It blocks bug 259454.
See this testcase.
focus is set to first anchor, press enter.
If the javascript code is successed, you can show the alert dialog that text is
"success". But if the code is failed, you can see this message in Javascript
console.

Error: uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMEventTarget.dispatchEvent]" nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)"

20050621 build doesn't have this problem. but my build that is from CVS is
failed this.

This bug is blocks bug 259454 that is very important bug for CJK users. Please
hurry up to fix this regression!
Flags: blocking1.8b3?
Debug build returns following log.

WARNING: NS_ENSURE_TRUE(!NS_IS_EVENT_IN_DISPATCH(innerEvent)) failed, file
m:/mozilla-d/mozilla/content/events/src/nsEventStateManager.cpp, line 4344

JavaScript error: , line 0: uncaught exception: [Exception... "Component
returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)
[nsIDOMEventTarget.dispatchEvent]"  nsresult: "0x80070057
(NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::
https://bugzilla.mozilla.org/attachment.cgi?id=186995 :: enter :: line 12" 
data: no]
Flags: blocking-aviary1.0.5?
Specs say that you can't dispatch an event already being dispatched.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Flags: blocking1.8b3?
Flags: blocking-aviary1.0.5?
Then, if I want to fire the event, should I just do what?
See bug 259454, I want to fire the keypress event in anchor element when user
press key in find toolbar.
(In reply to comment #4)
> Specs say that you can't dispatch an event already being dispatched.

Where is this spec?
*** Bug 301531 has been marked as a duplicate of this bug. ***
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.