Added window close event in the popup error callback
Merge branch 'Features/popup-close-callback' into develop