Skip to content

Commit cd4309b

Browse files
authored
fix(offerwall): don't autofocus dialog in preview mode (#581)
1 parent 18ea37b commit cd4309b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/src/offerwall/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ export class OfferwallModal extends LitElement {
130130
#dialogRef: Ref<HTMLDialogElement> = createRef()
131131
#openDialog() {
132132
if (this.#controller.isPreviewMode) {
133-
this.#dialogRef.value!.show()
133+
const dialog = this.#dialogRef.value!
134+
dialog.inert = true
135+
dialog.show()
136+
dialog.inert = false
134137
return
135138
}
136139
this.#dialogRef.value!.showModal()

0 commit comments

Comments
 (0)