From 4b55c4fb57eb760fb99f5d20f3d372bfd4d9a44d Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 21 Apr 2025 11:01:41 +0300 Subject: [PATCH] docs: fix messy layout bug (#12248) --- .../docs-ui/src/hooks/use-recaptcha/index.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/www/packages/docs-ui/src/hooks/use-recaptcha/index.tsx b/www/packages/docs-ui/src/hooks/use-recaptcha/index.tsx index 3edce8bd2d..c5ad24a151 100644 --- a/www/packages/docs-ui/src/hooks/use-recaptcha/index.tsx +++ b/www/packages/docs-ui/src/hooks/use-recaptcha/index.tsx @@ -121,6 +121,17 @@ export const useRecaptcha = ({ siteKey }: UseRecaptchaProps) => { } }, [isScriptLoaded]) + useEffect(() => { + if (!isExecuteReady) { + return + } + + const recaptchaElm = document.querySelector(".grecaptcha-badge") + if (recaptchaElm?.parentElement) { + recaptchaElm.parentElement.classList.add("absolute") + } + }, [isExecuteReady]) + const execute = useCallback( async (actionName: RecaptchaAction): Promise => { if (!isExecuteReady) {