Prevent going to the next page in presentation mode when closing the context menu