xforms-submit-done event firing before submission is complete

Project:formsPlayer
Version:1.5.2
Component:Code
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

In some cases, formsPlayer fires the xforms-submit-done event before the events corresponding to the submission are complete.

In our form, we use an event handler for the xforms-submit-done event to trigger the loading of a resource that logs the user out. If this resource is loaded before the submission is done, though, the submission may fail because the user's session will have been invalidated.

<xf:action ev:event="xforms-submit-done">
  <xf:load resource="http://example.org/some/logout/uri"/>
</xf:action>

Please note that with this problem, it is difficult to provide a test case, as the results that we are seeing involve client and server interaction in the case where a form submission happens after an event handler for the xforms-submit-done event is dispatched. If you have significant problems with reproducing this issue, we can try to put a test case together.