diff --git a/src/common/ActionButtons/ActionButtons.tsx b/src/common/ActionButtons/ActionButtons.tsx index 225d697..57c6d4d 100644 --- a/src/common/ActionButtons/ActionButtons.tsx +++ b/src/common/ActionButtons/ActionButtons.tsx @@ -43,14 +43,14 @@ export const ActionButtons: FC = props => { const firstButton = document.getElementById(`${webchatButtonTemplateButtonId}-0`); const chatHistory = document.getElementById("webchatChatHistoryWrapperLiveLogPanel"); - if (!config?.settings.enableAutoFocus) return; + if (!config?.settings?.widgetSettings?.enableAutoFocus) return; if (!chatHistory?.contains(document.activeElement)) return; setTimeout(() => { firstButton?.focus(); }, 200); - }, [config?.settings.enableAutoFocus, webchatButtonTemplateButtonId]); + }, [config?.settings?.widgetSettings?.enableAutoFocus, webchatButtonTemplateButtonId]); if (!payload || payload?.length === 0) return null;