A Popup Page can be closed via the standard “Close”-Cross in the title bar. Especially for touch operation this might be too small.
This article describes how to alternatively close the popup page via a StateButton placed on a page.
First place a StateButton on the page. It is sufficient if it has only one state. Assign the picture or text to the states “-” (unknown) and “0”.
Then add some code to be executed on mouse click via “Events..” (Context menu):