Skip to content

Commit f9a40ef

Browse files
Merge pull request #4413 from kris6673/fix-loss-of-focus
Fix: Fix focus loss in RichTextEditor
2 parents a78392e + 3aa4ec7 commit f9a40ef

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/CippComponents/CippFormComponent.jsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ export const CippFormComponent = (props) => {
343343
<RichTextEditor
344344
{...other}
345345
ref={field.ref}
346-
key={field.value ? "edit" : ""}
347346
extensions={[StarterKit]}
348347
content={field.value || ""}
349348
onUpdate={({ editor }) => {
@@ -432,7 +431,7 @@ export const CippFormComponent = (props) => {
432431
control={formControl.control}
433432
rules={validators}
434433
render={({ field }) => (
435-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
434+
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
436435
<Box sx={{ flexGrow: 1 }}>
437436
<DateTimePicker
438437
slotProps={{ textField: { fullWidth: true } }}
@@ -481,11 +480,11 @@ export const CippFormComponent = (props) => {
481480
field.onChange(unixTimestamp);
482481
}}
483482
sx={{
484-
height: '42px',
485-
minWidth: '42px',
486-
padding: '8px 12px',
487-
alignSelf: 'flex-end',
488-
marginBottom: '0px', // Adjust to align with input field
483+
height: "42px",
484+
minWidth: "42px",
485+
padding: "8px 12px",
486+
alignSelf: "flex-end",
487+
marginBottom: "0px", // Adjust to align with input field
489488
}}
490489
title="Set to current date and time"
491490
>

0 commit comments

Comments
 (0)