Close details bar before navigating to another page