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
Environment: Windows XP, IE7
Reporter: John Singleton
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.