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.
This commit is contained in:
Alastair Bridgewater 2019-06-10 11:15:41 -04:00
parent d153c2b4f0
commit 26b535a37d
2 changed files with 4 additions and 1 deletions

View File

@ -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");
}
}

View File

@ -95,7 +95,7 @@
<a id="playing" target="_blank"></a>
<div id="messages" class="scrollbar"></div>
<div id="msgbox">
<div id="suggestions" class="scrollbar"></div>
<div id="suggestions" class="scrollbar" style="display: none;"></div>
<textarea id="msg"></textarea>
</div>
<input id="send" type="button" class="button" onclick="sendChat();" value="Send" />