From a928ceb6bb65ea934e60e5e27b77737b471f899e Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Thu, 14 Apr 2022 02:41:37 +0300 Subject: [PATCH] Fix hiding send as menu --- src/components/chat/input.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/chat/input.ts b/src/components/chat/input.ts index ed4c433c..83306f07 100644 --- a/src/components/chat/input.ts +++ b/src/components/chat/input.ts @@ -1337,8 +1337,12 @@ export default class ChatInput { private updateBotCommandsToggle(skipAnimation?: boolean) { const {botCommandsToggle, hasBotCommands} = this; - const show = hasBotCommands && this.isInputEmpty(); + const show = !!hasBotCommands && this.isInputEmpty(); if(!hasBotCommands) { + if(!botCommandsToggle.parentElement) { + return; + } + botCommandsToggle.remove(); }