We have a document repository in our application and we use the last build of version 4 to allow users to view documents.
There is a large list of docuements and when the user clicks to view the document a modal is opened and the content of the modal is fetched from the server via ajax using the MVC methodology.
1: User clicks 'view doc' button, modal appears, DU generated in MVC View, content transferred by AJAX: No JavaScript error.
2: User closes the modal.
3: User clicks 'view doc' button, modal appears, DU generated in MVC View, content transferred by AJAX: Single JavaScript error. Cannot read property 'docViewer' of undefined, But modal is displayed and content is visible.
4: User closes the modal.
5: User clicks 'view doc' button, modal appears, DU generated in MVC View, content transferred by AJAX: Two new JavaScript errors. both say: Cannot read property 'docViewer' of undefined, But modal is displayed and content is visible.
6: User closes the modal.
7: User clicks 'view doc' button, modal appears, DU generated in MVC View, content transferred by AJAX: Three new JavaScript errors. both say: Cannot read property 'docViewer' of undefined, But modal is displayed and content is visible.
Every time a doc viewer is removed from the DOM and a new doc viewer added to the DOM it is like the documents that were disposed of were not destroyed in the JavaScript, and a method is looking for their 'docViewer' property which cannot be found as the docs are no longer on the DOM.