diff --git a/frontend/src/components/Cell.tsx b/frontend/src/components/Cell.tsx index c0d67979..e20ed0e0 100644 --- a/frontend/src/components/Cell.tsx +++ b/frontend/src/components/Cell.tsx @@ -51,7 +51,7 @@ export const Cell = ({ const onEscapeArea = (e: any) => { { if (e.key === "Escape") { - setShowCommentArea(false); + onBlurArea(); } } }; @@ -97,10 +97,10 @@ export const Cell = ({ date, "yyyy-MM-dd" )}`} - onChange={onCellChange} - onKeyUp={onDeleteCellEntry} - onFocus={onFocusRow} - onBlur={onBlurRow} + onChange={(ev) => onCellChange(ev)} + onKeyUp={(ev) => onDeleteCellEntry(ev)} + onFocus={() => onFocusRow()} + onBlur={() => onBlurRow()} className="cell" defaultValue={hours === 0 ? "" : hours} /> @@ -109,7 +109,7 @@ export const Cell = ({ className={comments === "" ? "comment comment-unfilled" : "comment"} type="button" title="Toggle comment area" - onFocus={onFocusRow} + onFocus={() => onFocusRow()} onClick={() => onCommentButtonClick()} > )} @@ -119,14 +119,14 @@ export const Cell = ({