Hide api bar correctly when api-url-btn clicked