🐛 Fix progress bar fixed position on Bubble embed

Closes #1328
This commit is contained in:
Baptiste Arnaud
2024-03-07 09:18:03 +01:00
parent df209a8e9d
commit b05fafe518
6 changed files with 25 additions and 5 deletions

View File

@@ -55,6 +55,8 @@ export const Bubble = (props: BubbleProps) => {
setButtonSize(parseButtonSize(bubbleProps.theme?.button?.size ?? 'medium'))
})
let progressBarContainerRef
onMount(() => {
window.addEventListener('message', processIncomingEvent)
const autoShowDelay = bubbleProps.autoShowDelay
@@ -164,6 +166,7 @@ export const Bubble = (props: BubbleProps) => {
isBotOpened={isBotOpened()}
buttonSize={buttonSize()}
/>
<div ref={progressBarContainerRef} />
<div
part="bot"
style={{
@@ -194,6 +197,7 @@ export const Bubble = (props: BubbleProps) => {
{...botProps}
prefilledVariables={prefilledVariables()}
class="rounded-lg"
progressBarRef={progressBarContainerRef}
/>
</Show>
</div>