Skip to content

Commit 8d96507

Browse files
BernardGattBernard Gatt
andauthored
Fixes an issue where the primary overlay message step is loaded as a modal (#140)
Co-authored-by: Bernard Gatt <bernard@customer.io>
1 parent 9b401fd commit 8d96507

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/managers/queue-manager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from '../services/queue-service';
99
import { showMessage, embedMessage, resetMessage } from './message-manager';
1010
import { resolveMessageProperties } from './gist-properties-manager';
11+
import { positions } from './page-component-manager';
1112
import { clearKeyFromLocalStore, getKeyFromLocalStore } from '../utilities/local-storage';
1213
import {
1314
updateBroadcastsLocalStore,
@@ -137,7 +138,11 @@ export async function handleMessage(message: GistMessage): Promise<boolean> {
137138
let result: GistMessage | null = null;
138139
if (messageProperties.isEmbedded) {
139140
const isLivePreview = Gist.config.isPreviewSession && message.properties?.gist?.livePreview;
140-
if (isLivePreview && !findElement(messageProperties.elementId)) {
141+
if (
142+
isLivePreview &&
143+
!findElement(messageProperties.elementId) &&
144+
!positions.includes(messageProperties.elementId)
145+
) {
141146
log(
142147
`Preview: element "${messageProperties.elementId}" not found, showing as overlay so placement can be changed`
143148
);

0 commit comments

Comments
 (0)