From 3cfec37e9d8da6d2a70d15e05d31ea4997aec60b Mon Sep 17 00:00:00 2001 From: heheer Date: Thu, 13 Feb 2025 13:36:56 +0800 Subject: [PATCH] fix embed chatbot default open (#3774) --- projects/app/public/js/iframe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/app/public/js/iframe.js b/projects/app/public/js/iframe.js index 76e1508fc..a2d19f992 100644 --- a/projects/app/public/js/iframe.js +++ b/projects/app/public/js/iframe.js @@ -114,7 +114,6 @@ function embedChatbot() { if (!chatWindow) return; const visibilityVal = chatWindow.style.visibility; if (visibilityVal === 'hidden') { - updateChatWindowPosition(); chatWindow.style.visibility = 'unset'; ChatBtnDiv.src = CloseIcon; } else { @@ -157,5 +156,6 @@ function embedChatbot() { ChatBtn.appendChild(ChatBtnDiv); document.body.appendChild(ChatBtn); + updateChatWindowPosition(); } window.addEventListener('load', embedChatbot);