diff --git a/website/client/components/Home/TryIt.vue b/website/client/components/Home/TryIt.vue index e7d269cd5..05768eb46 100644 --- a/website/client/components/Home/TryIt.vue +++ b/website/client/components/Home/TryIt.vue @@ -478,4 +478,16 @@ onMounted(() => { border-color: #333 transparent transparent transparent; } +/* The Turnstile widget is executed programmatically via execution: 'execute'. + The container must remain in the DOM (removing it prevents widget rendering) + but should not affect page layout or be visible. */ +.turnstile-container { + position: absolute; + width: 0; + height: 0; + overflow: hidden; + visibility: hidden; + pointer-events: none; +} + diff --git a/website/client/composables/useTurnstile.ts b/website/client/composables/useTurnstile.ts index 80d6cc00e..25cf88260 100644 --- a/website/client/composables/useTurnstile.ts +++ b/website/client/composables/useTurnstile.ts @@ -87,7 +87,6 @@ export function useTurnstile() { if (!widgetId.value) { widgetId.value = turnstile.render(el, { sitekey: siteKey, - size: 'invisible', action: 'pack', execution: 'execute', callback: (token: string) => { diff --git a/website/client/composables/useTurnstileScript.ts b/website/client/composables/useTurnstileScript.ts index d76236be1..93f68c753 100644 --- a/website/client/composables/useTurnstileScript.ts +++ b/website/client/composables/useTurnstileScript.ts @@ -18,7 +18,7 @@ export interface TurnstileGlobal { export interface TurnstileRenderOptions { sitekey: string; - size?: 'normal' | 'compact' | 'invisible'; + size?: 'normal' | 'compact' | 'flexible'; // `action` is bound into the issued token and verified server-side, so a // token minted for /api/pack can't be replayed at a future endpoint that // expects a different action.