From f6597447209d52e3259ad782fc2ced974d0f6f58 Mon Sep 17 00:00:00 2001 From: Nishant Mittal Date: Sat, 13 Feb 2021 00:11:15 +0530 Subject: [PATCH] ui: Fix detection of narrow window. Fixes #17280. --- static/js/message_viewport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/message_viewport.js b/static/js/message_viewport.js index 10bee87aec..f8a81bfb04 100644 --- a/static/js/message_viewport.js +++ b/static/js/message_viewport.js @@ -307,7 +307,7 @@ exports.is_narrow = function () { // This basically returns true when we hide the right sidebar for // the left_side_userlist skinny mode. It would be nice to have a less brittle // test for this. - return window.innerWidth < media_breakpoints.xl_min; + return window.innerWidth < Number(media_breakpoints.xl_min.slice(0, -2)); }; exports.system_initiated_animate_scroll = function (scroll_amount) {