When I click, it works fine. but I go to focus on the check box; it takes half of the height of the modal. (Not i replace the checkbox input with html input and its works fine) and also other element is working fine
It should just focus the input with out changing the scroll position
๐ฏ Current Behavior
Focusing the input modal takes unusual hight
๐ Possible Solution
No response
๐ฆ Context
No response
๐ฅ๏ธ Steps to Reproduce
Checkbox component Code
"use client";
import { CheckBoxIcon, BoxIcon } from "icons";
import type { CheckboxProps } from "react-aria-components";
import { Checkbox as AriaCheckbox } from "react-aria-components";
Provide a general summary of the issue here
When I click, it works fine. but I go to focus on the check box; it takes half of the height of the modal. (Not i replace the checkbox input with html input and its works fine) and also other element is working fine
https://github.com/user-attachments/assets/023299cf-d1bb-4652-830f-87c775b487d4
๐ค Expected Behavior?
It should just focus the input with out changing the scroll position
๐ฏ Current Behavior
Focusing the input modal takes unusual hight
๐ Possible Solution
No response
๐ฆ Context
No response
๐ฅ๏ธ Steps to Reproduce
Checkbox component Code
"use client";
import { CheckBoxIcon, BoxIcon } from "icons"; import type { CheckboxProps } from "react-aria-components"; import { Checkbox as AriaCheckbox } from "react-aria-components";
import { Text } from "../Text/Text";
export interface ICheckboxProps extends CheckboxProps { label?: string | JSX.Element; description?: string; isBoldLabel?: boolean; isRequired?: boolean; errorMessage?: string; }
export function Checkbox({ label, description, isBoldLabel, isRequired, errorMessage, ...props }: ICheckboxProps): JSX.Element { return (
{description} > )} {isRequired && (
); }
Modal Component Code
"use client";
/ eslint-disable react/prop-types / import { cva, VariantProps } from "class-variance-authority"; import { CloseIcon } from "icons"; import { ReactNode } from "react"; import { Dialog, Modal as AriaModal, ModalOverlay, ModalOverlayProps, DialogTrigger, Button, } from "react-aria-components";
import { Text } from "../Text/Text";
export interface IModalProps extends ModalOverlayProps, VariantProps {
title?: string;
triggerNode?: ReactNode;
isBackgroundBlur?: boolean;
children: ReactNode;
closeIcons?: boolean;
onOpenRequest?: () => void;
animatedModalClassName?: string;
}
export function Modal({ title = "", triggerNode, closeIcons = true, isBackgroundBlur = false, children, background, onOpenRequest, animatedModalClassName = "md:min-w-[760px] h-[540px] flex flex-1 items-center justify-center", ...props }: Readonly): JSX.Element {
return (
); }
const ariaModalClass = cva( " w-full relative max-w-md overflow-hidden rounded-2xl text-left align-middle ", { variants: { background: { white: "bg-white shadow-xl", transparent: "bg-transparent", black: "bg-black", }, isEnteringClass: { true: "animate-in zoom-in-95 ease-out duration-900", false: "", }, isExitingClass: { true: "animate-out zoom-out-95 ease-in duration-200", false: "", }, }, defaultVariants: { background: "white", }, } );
Version
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac OS
๐งข Your Company/Team
No response
๐ท Tracking Issue
No response