diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index b30d04035b06..98343a837c4b 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -180,6 +180,12 @@ See COPYRIGHT and LICENSE files for more details.
$('.can-hide-navigation').addClass('hidden-navigation');
}
+ window.addEventListener('resize', function() {
+ if (window.innerWidth < 1012) {
+ $('.can-hide-navigation').addClass('hidden-navigation');
+ }
+ });
+
if (mainMenuCollapsed === 'true') {
savedMainMenuWidth = 0;
}