fix: description label is not focusing on new event-type create modal (#23603)

* fix: description label is not focusing

* changes

---------

Co-authored-by: Devanshu Sharma <devanshusharma658@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
This commit is contained in:
Bandhan Majumder
2025-10-28 12:02:04 +00:00
committed by GitHub
co-authored by Devanshu Sharma Anik Dhabal Babu
parent b3297f2843
commit fc159fb9ea
+11 -1
View File
@@ -61,7 +61,16 @@ export const Editor = (props: TextEditorProps) => {
const plainText = props.plainText ?? false;
return (
<div className="editor rounded-md">
{props.label && <label className="mb-1 block text-sm font-medium leading-6">{props.label}</label>}
{props.label && (
<label
onClick={() => {
const el = document.getElementById("custom-editor");
el?.focus();
}}
className="mb-1 block text-sm font-medium leading-6">
{props.label}
</label>
)}
<LexicalComposer initialConfig={{ ...editorConfig }}>
<div className="editor-container hover:border-emphasis focus-within:ring-brand-default !rounded-lg p-0 transition focus-within:ring-2 focus-within:ring-offset-0">
<ToolbarPlugin
@@ -81,6 +90,7 @@ export const Editor = (props: TextEditorProps) => {
<RichTextPlugin
contentEditable={
<ContentEditable
id="custom-editor"
readOnly={!editable}
style={{ height: props.height }}
className="editor-input focus:outline-none"