From 7f09f385037d99325e6b2e96842f5ff1914b64fb Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 28 Mar 2024 08:41:44 +0200 Subject: [PATCH] popup styling --- package.json | 2 +- src/CrossWindowProvider/CrossWindowProvider.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0aa516a..45c1035 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-web-wallet-cross-window-provider", - "version": "0.0.28-alpha.11", + "version": "0.0.28-alpha.12", "description": "Signing provider for dApps: Cross Window", "main": "out/index.js", "types": "out/index.d.js", diff --git a/src/CrossWindowProvider/CrossWindowProvider.ts b/src/CrossWindowProvider/CrossWindowProvider.ts index ee3ebeb..010816d 100644 --- a/src/CrossWindowProvider/CrossWindowProvider.ts +++ b/src/CrossWindowProvider/CrossWindowProvider.ts @@ -288,7 +288,7 @@ export class CrossWindowProvider { } protected async openPopupConsent(): Promise { - const dialog = safeWindow.document?.createElement('dialog'); + const dialog = safeWindow.document?.createElement('div'); const document = safeWindow.document; if (!this._shouldShowConsentPopup || !document || !dialog) { return true; @@ -298,25 +298,21 @@ export class CrossWindowProvider { dialog.innerHTML = getMarkup(this.windowManager.walletUrl); document.body.appendChild(dialog); - dialog.showModal(); const popupConsentResponse: boolean = await new Promise((resolve) => { const confirmButton = document.getElementById(confirmId); const cancelButton = document.getElementById(cancelId); if (!confirmButton || !cancelButton) { resolve(true); - dialog.close(); document.body.removeChild(dialog); return; } confirmButton.addEventListener('click', function () { resolve(true); - dialog.close(); document.body.removeChild(dialog); }); cancelButton.addEventListener('click', function () { resolve(false); - dialog.close(); document.body.removeChild(dialog); }); });