Skip to content

Commit

Permalink
fix: Fix zindex for embedded chatbots
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed Nov 21, 2024
1 parent cbdf31c commit 931ba28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/ChatBotContainer.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
flex-direction: column;
width: 375px;
height: 550px;
z-index: 10000;
}

.rcb-window-embedded .rcb-chat-window {
Expand Down
9 changes: 9 additions & 0 deletions src/components/ChatBotContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ const ChatBotContainer = ({
height: `${viewportHeight}px`,
}
}

// if not embedded, add z-index
if (!settings.general?.embedded) {
return {
...styles.chatWindowStyle,
zIndex: 10000,
};
}

return styles.chatWindowStyle;
}

Expand Down

0 comments on commit 931ba28

Please sign in to comment.