xforms-model-construct event handler not firing

RESOLVED FIXED

Status

RESOLVED FIXED
14 years ago
2 years ago

People

(Reporter: aaronr, Assigned: aaronr)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

835 bytes, application/xhtml+xml
Details
3.71 KB, patch
allan
: review+
doronr
: review+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
We are properly generating the xforms-model-construct event and targeting the
model, but the event handler doesn't get hit.  Probably a timing bug?  We need
to figure this out to pass a conformance test.
(Assignee)

Comment 1

14 years ago
Created attachment 183009 [details]
testcase

should see a modal message popup when the form is loaded

Comment 2

14 years ago
I think the xforms-model-construct event is dispatched before XML Events
handlers are registered. So xforms-model-construct should be dispatched after
DOMContentLoaded.
(Assignee)

Comment 3

14 years ago
Created attachment 183610 [details] [diff] [review]
first attempt at fix

I basically had to move xforms-model-construct, xforms-rebuild,
xforms-recalculate, xforms-revalidate to after DOMContentLoaded event was
detected because of the XML Event listener registration not happening until
after document load.  Had to move rebuild, recalc and revalidate because they
were in the same boat as xforms-model-construct....event handlers not firing
during load.
Attachment #183610 - Flags: review?(allan)

Comment 4

14 years ago
Comment on attachment 183610 [details] [diff] [review]
first attempt at fix

Ooops, sorry Aaron, I didn't see the request.

>@@ -281,16 +272,17 @@ nsXFormsModelElement::DoneAddingChildren
>+      nsresult rv;

Initialize it to get rid of the compiler warning.

>@@ -765,16 +757,30 @@ nsXFormsModelElement::HandleEvent(nsIDOM
>+  // dispatch xforms-model-construct, xforms-rebuild, xforms-recalculate, 

Delete bonus space at end of line.

r+
Attachment #183610 - Flags: review?(allan) → review+
(Assignee)

Comment 5

14 years ago
Comment on attachment 183610 [details] [diff] [review]
first attempt at fix

Doron, could you do the second review?	And could you add Allan's nits and
check in if you don't find anything else yourself?  Since I'll be out of the
office for a while...
Attachment #183610 - Flags: review?(doronr)

Updated

14 years ago
Attachment #183610 - Flags: review?(doronr) → review+

Comment 6

14 years ago
Checked in.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.