by Clifton » Mon Feb 23, 2015 1:50 pm
Outside of IE, this function does not work very well. Browser security has made it impossible to successfully capture the window.close event. We used to be able to do this with limited success in Firefox and Chrome, but now these browsers just ignore any scripting that would display a message with the window.onbeforeunload event.
More than likely this functionality will not be reliable in IE either as time goes on, especially with the release of Windows 10 and beyond.
The real purpose behind this function was to prevent a situation wherein a student attempted to close the browser window before their course results were posted to an LMS. This function provided a way for a student to back out from their decision to close the window. However, even in the early days, while we could display the message, we could not prevent the inevitable closing of the browser window. Fortunately IE still works as of version 11 but the trigger event doesn't reach its intended target anymore.
We don't expect this function to remain in the PowerPac in future releases. In the meantime, we will continue doing some research into possible alternatives/workarounds. Anyone who has suggestions or discovers a solution is welcome to post their findings.