Error on closing pop-up th Esc key

When I am trying to close a pop-up with Esc key, the pop-up is being closed just fine however the page parameter for the already opened page becomes null. How can we avoid this problem?
1 answers

What is the close action in the properties of your popup? If it’s “cancel changes”, try pointing that to a button with “close page” instead. The default is “cancel”, but you can change that to any button action in your popup.