[bug]: CKEditor 5 options cause the dialog to close unexpectedly, and the link and media features don't work due to overlay issues.
Author: kartikxiskCreated Sep 23, 2024Updated Sep 25, 2026
Labelsbugstale?
Describe the bug
CYSheet.js File
import {
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
} from '@/components/ui/sheet';
function CYSheet({
open,
setOpen,
title = 'Add Title',
description,
showHeader = true,
render,
className,
headerClassName = '',
side = 'right',
}) {
return (
<Sheet open={open} onOpenChange={setOpen}>
<SheetContent
side={side}
className={`w-full max-w-md p-0 flex flex-col gap-0 ${className ? className : 'sm:max-w-md'}`}
>
<SheetHeader
className={`${!showHeader && 'hidden'} space-y-0 text-left ${headerClassName ? headerClassName : 'p-4'}`}
>
<SheetTitle>{title}</SheetTitle>
<SheetDescription className={`${!description && 'hidden'}`}>{description}</SheetDescription>
</SheetHeader>
{render}
</SheetContent>
</Sheet>
);
}
export default CYSheet;I am using here
<CYSheet
title="Update Round"
description="Please select the round type from below:"
open={updateRoundModal}
setOpen={setUpdateRoundModal}
render={
<UpdateRound mutateOpportunity={mutateOpportunity} setUpdateRoundModal={setUpdateRoundModal} round={round} />
}
className="sm:max-w-6xl"
headerClassName="bg-zinc-50 p-4 border-b"
/>on Update Round, I have used Ckedtor 5
Affected component/components
Dialog, Sheet
How to reproduce
To reproduce the issue:
Open a dialog that contains CKEditor 5. Interact with CKEditor options, such as link or media. Observe that the dialog closes unexpectedly without clicking the close button. The link and media overlays don’t function properly, preventing their use.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Linux, ChromeBefore submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues
Source: shadcn-ui/ui