From 42bcead6277a365230e3795283c4bc1d63c76ae7 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Mon, 10 Jun 2019 11:15:41 -0400 Subject: [PATCH] Hide suggestion menu explicitly * On some systems (currently hypothesized to be Firefox with GTK+ using a system theme that has always-visible scrollbars with a minimum size on their long axis), the suggestion menu starts off visible and obscuring the chat message entry area, then moves to obscuring the chat history area once it has been invoked. At no time does it become invisible. * Fix, by hiding the suggestion menu by default and explicitly managing its visibility as it is updated. --- static/js/chat.js | 3 +++ static/main.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/chat.js b/static/js/chat.js index 96448c2..8093cea 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -120,6 +120,9 @@ function sendChat() { function updateSuggestionCss(m) { if ($("#suggestions").children().length > 0) { $("#suggestions").css("bottom", $("#msg").outerHeight(true) - 1 + "px"); + $("#suggestions").css("display", ""); + } else { + $("#suggestions").css("display", "none"); } } diff --git a/static/main.html b/static/main.html index 209b82e..c47c14d 100644 --- a/static/main.html +++ b/static/main.html @@ -95,7 +95,7 @@
-
+