Fixed a bug that caused the navigation bar to flicker when the document was clicked.