Skip to content

Commit f458fbd

Browse files
authored
Merge pull request #1590 from serhiizghama/fix/turnstile-invalid-size-param
fix(website): remove invalid Turnstile size 'invisible', hide container via CSS
2 parents d4c73dc + 9c1d961 commit f458fbd

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

website/client/components/Home/TryIt.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,4 +478,16 @@ onMounted(() => {
478478
border-color: #333 transparent transparent transparent;
479479
}
480480
481+
/* The Turnstile widget is executed programmatically via execution: 'execute'.
482+
The container must remain in the DOM (removing it prevents widget rendering)
483+
but should not affect page layout or be visible. */
484+
.turnstile-container {
485+
position: absolute;
486+
width: 0;
487+
height: 0;
488+
overflow: hidden;
489+
visibility: hidden;
490+
pointer-events: none;
491+
}
492+
481493
</style>

website/client/composables/useTurnstile.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ export function useTurnstile() {
8787
if (!widgetId.value) {
8888
widgetId.value = turnstile.render(el, {
8989
sitekey: siteKey,
90-
size: 'invisible',
9190
action: 'pack',
9291
execution: 'execute',
9392
callback: (token: string) => {

website/client/composables/useTurnstileScript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface TurnstileGlobal {
1818

1919
export interface TurnstileRenderOptions {
2020
sitekey: string;
21-
size?: 'normal' | 'compact' | 'invisible';
21+
size?: 'normal' | 'compact' | 'flexible';
2222
// `action` is bound into the issued token and verified server-side, so a
2323
// token minted for /api/pack can't be replayed at a future endpoint that
2424
// expects a different action.

0 commit comments

Comments
 (0)