hacks and fixes
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -46,4 +46,10 @@ function setVHvar() {
|
||||
function mobileVHhack() {
|
||||
setVHvar();
|
||||
window.addEventListener("orientationchange", setVHvar);
|
||||
}
|
||||
|
||||
function isAndroidMobile() {
|
||||
var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1;
|
||||
//&& ua.indexOf("mobile");
|
||||
return isAndroid;
|
||||
}
|
||||
Reference in New Issue
Block a user