[
https://issues.apache.org/jira/browse/MYFACES-1691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588159#action_12588159
]
Leonardo Uribe commented on MYFACES-1691:
-----------------------------------------
I have tested this on firefox and IE and it's a specific bug for IE.
So, the solution for avoid this is as suggested, surround submit call with a
try catch.
> beforeUnload event handler breaks form submission
> -------------------------------------------------
>
> Key: MYFACES-1691
> URL: https://issues.apache.org/jira/browse/MYFACES-1691
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 1.1.5, 1.2.0, 1.2.2
> Environment: Windows XP, IE7
> Reporter: John Singleton
> Assignee: Leonardo Uribe
>
> I am using the onBeforeUnload event to prevent the user leaving the page
> without first saving their work.
> If the user cancels the page navigation, further navigation in the page
> fails. I tracked this down to this call in oamSubmitForm
> document.forms[formName].submit();
> In IE when the user cancels navigation of the page the form.submit method
> throws an exception. This isn't caught in oamSubmitForm and so it doesn't
> complete cleanly.
> I fixed this by changing the 2 calls to form.submit too:
> try { document.forms[formName].submit(); } catch (e) {}
> oamSubmitForm now completes cleanly and further navigation in the page
> succeeds.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.