diff --git a/assets/chat/js/chat.js b/assets/chat/js/chat.js index 304fc271..2c790b01 100644 --- a/assets/chat/js/chat.js +++ b/assets/chat/js/chat.js @@ -406,11 +406,17 @@ class Chat { e.preventDefault(); e.stopPropagation(); this.control.emit('SEND', this.input.val().toString().trim()); + this.input[0].inputMode = 'none'; this.adjustInputHeight(); this.input.focus(); } }); + this.input.on('click', () => { + this.input[0].inputMode = 'text'; + this.adjustInputHeight(); + }); + // Watching focus this.ui.on('click touch', '#chat-watching-focus-btn', () => { this.watchingfocus = !this.watchingfocus; @@ -428,6 +434,7 @@ class Chat { downinoutput = false; ChatMenu.closeMenus(this); this.focusIfNothingSelected(); + this.input[0].inputMode = 'none'; } }); this.ui.on('click', '#chat-tools-wrap', () => { diff --git a/assets/chat/js/menus/ChatEmoteMenu.js b/assets/chat/js/menus/ChatEmoteMenu.js index 1240e4c3..ef37e739 100644 --- a/assets/chat/js/menus/ChatEmoteMenu.js +++ b/assets/chat/js/menus/ChatEmoteMenu.js @@ -26,6 +26,9 @@ export default class ChatEmoteMenu extends ChatMenu { { atBegin: false }, ), ); + this.searchinput.on('click', () => { + this.searchinput[0].inputMode = 'text'; + }); } show() { @@ -34,6 +37,13 @@ export default class ChatEmoteMenu extends ChatMenu { this.buildEmoteMenu(); } + hide() { + if (this.visible) { + this.searchinput[0].inputMode = 'none'; + } + super.hide(); + } + buildEmoteMenu() { const favoriteEmotes = [...this.chat.favoriteemotes].filter((e) => this.chat.emoteService.hasEmote(e), diff --git a/assets/chat/js/menus/ChatUserMenu.js b/assets/chat/js/menus/ChatUserMenu.js index d8955df2..a3cdc55f 100644 --- a/assets/chat/js/menus/ChatUserMenu.js +++ b/assets/chat/js/menus/ChatUserMenu.js @@ -88,6 +88,9 @@ export default class ChatUserMenu extends ChatMenu { { atBegin: false }, ), ); + this.searchinput.on('click', () => { + this.searchinput[0].inputMode = 'text'; + }); } show() { @@ -95,6 +98,13 @@ export default class ChatUserMenu extends ChatMenu { this.searchinput.focus(); } + hide() { + if (this.visible) { + this.searchinput[0].inputMode = 'none'; + } + super.hide(); + } + redraw() { if (this.visible) { const searching = this.searchterm.length > 0; diff --git a/assets/views/embed.html b/assets/views/embed.html index e4896de7..7b2c03cf 100644 --- a/assets/views/embed.html +++ b/assets/views/embed.html @@ -40,6 +40,7 @@ tabindex="1" autofocus spellcheck + inputmode="none" > @@ -274,6 +275,7 @@
Users
class="form-control" value="" placeholder="Username search ..." + inputmode="none" /> @@ -391,6 +393,7 @@
Emotes
class="form-control" value="" placeholder="Emote search ..." + inputmode="none" />