Refs #17455. Fix and improve clarity of address bar hiding code
(cherry picked from commit 63fd8e6a31d5e87ed4c949cac7c1b59740fd1d78)