We just upgraded from 5.0 FP14 to 5.1 FP12. When users action an item and the form closes the browser tab, they are now getting an IE window popup that says "The webpage you are viewing is trying to close the tab. Do you want to close this tab?". I never received this message when closing the brower windows through code in prior version of K2. Only happens in IE 11 but not in Chrome. Any thoughts how to solve this issue?
IE popup message when the form in code closes a tab in 5.1
Best answer by mhackel
I created a ticket for K2 and this is what they said:
The 'Close the browser window' rule has a small flaw, HTML 5 standards dictate that windows that have not been opened by a script cannot be closed by that script: https://www.w3.org/TR/html51/browsers.html#dom-window-close
Here's a community post regarding this issue: http://community.k2.com/t5/K2-blackpearl/Rule-quot-close-the-browser-window-quot-with-different-results/m-p/63350#M17734
This label for the rule does cause confusion and we currently have a feature request to change it to 'Close the Form'.
We also have a workaround:
Create a Literal, Hidden Data Label on your form, and when you wish to close the window, create a Transfer Data rule that transfers the following script into the Data Label:
<script>window.open('', '_self', ''); window.close();</script>
This script opens a blank window on the current page and then closes it, getting around the aforementioned issue.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.