hacks and fixes

This commit is contained in:
Ginger Wong
2020-06-15 00:15:23 -07:00
parent f864e57340
commit cef9bc7adb
3 changed files with 57 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ class Messaging {
this.inputChangeUserName.addEventListener("keydown", this.handleUsernameKeydown.bind(this));
this.formMessageInput.addEventListener("keydown", this.handleMessageInputKeydown.bind(this));
this.btnSubmitMessage.addEventListener("click", this.handleSubmitChatButton.bind(this));
if (isAndroidMobile && window.screen.width < 860) {
this.formMessageInput.addEventListener("focus", this.handleKeyboardAppear.bind(this));
this.formMessageInput.addEventListener("blur", this.handleKeyboardOut.bind(this));
}
this.initLocalStates();
}
@@ -99,6 +103,13 @@ class Messaging {
this.tagAppContainer.className = this.chatDisplayed ? "flex" : "flex no-chat";
}
handleKeyboardAppear() {
this.tagAppContainer.classList.add("android-message-focus");
}
handleKeyboardOut() {
this.tagAppContainer.classList.remove("android-message-focus");
}
handleChatToggle() {
this.chatDisplayed = !this.chatDisplayed;
if (this.chatDisplayed) {