From daaa18b18af3c28af39143480b3c3725d970b0c6 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:33:56 +0530 Subject: [PATCH] chore: Use widget color for chat input focus state (#13214) --- app/javascript/widget/App.vue | 9 +++++++++ app/javascript/widget/components/ChatInputWrap.vue | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/javascript/widget/App.vue b/app/javascript/widget/App.vue index 379b2bc53..19a33b8a4 100755 --- a/app/javascript/widget/App.vue +++ b/app/javascript/widget/App.vue @@ -82,6 +82,7 @@ export default { const { websiteToken, locale, widgetColor } = window.chatwootWebChannel; this.setLocale(locale); this.setWidgetColor(widgetColor); + this.setWidgetColorVariable(widgetColor); setHeader(window.authToken); if (this.isIFrame) { this.registerListeners(); @@ -114,6 +115,14 @@ export default { 'resetCampaign', ]), ...mapActions('agent', ['fetchAvailableAgents']), + setWidgetColorVariable(widgetColor) { + if (widgetColor) { + document.documentElement.style.setProperty( + '--widget-color', + widgetColor + ); + } + }, scrollConversationToBottom() { const container = this.$el.querySelector('.conversation-wrap'); container.scrollTop = container.scrollHeight; diff --git a/app/javascript/widget/components/ChatInputWrap.vue b/app/javascript/widget/components/ChatInputWrap.vue index ce8d17455..a298237f3 100755 --- a/app/javascript/widget/components/ChatInputWrap.vue +++ b/app/javascript/widget/components/ChatInputWrap.vue @@ -130,7 +130,7 @@ export default {