Clear the URL hash when modals are closed.