Skip to content

Commit

Permalink
fix missing settings fix
Browse files Browse the repository at this point in the history
  • Loading branch information
David Scheier committed Mar 6, 2024
1 parent ab8c129 commit fbc76da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/ActionButtons/ActionButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ export const ActionButtons: FC<ActionButtonsProps> = 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;

Expand Down

0 comments on commit fbc76da

Please sign in to comment.