From 0755f81978a3ac795020597253fe6cdbf20c8040 Mon Sep 17 00:00:00 2001 From: Hamish Meikle Date: Thu, 30 Nov 2023 14:48:29 +1100 Subject: [PATCH] Set an initial popup height (#47) * Set initial height on iframe to match skeleton To reduce the changes of seeing a scrollbar on first load * Bump version --- package.json | 2 +- src/handlers/popup-handler.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 71f36b7..f5b64de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@authsignal/browser", - "version": "0.3.3", + "version": "0.3.4", "type": "module", "main": "dist/index.js", "module": "dist/index.js", diff --git a/src/handlers/popup-handler.ts b/src/handlers/popup-handler.ts index ba77a75..b2119f9 100644 --- a/src/handlers/popup-handler.ts +++ b/src/handlers/popup-handler.ts @@ -8,6 +8,8 @@ const IFRAME_ID = "__authsignal-popup-iframe"; const DEFAULT_WIDTH = "385px"; +const INITIAL_HEIGHT = "384px"; + type PopupShowInput = { url: string; }; @@ -97,6 +99,7 @@ export class PopupHandler { min-width: 100%; border-radius: inherit; max-height: 95vh; + height: ${INITIAL_HEIGHT}; } `;