Skip to content

Commit

Permalink
Merge pull request #489 from NBISweden/fix/navigation
Browse files Browse the repository at this point in the history
Update onBlur func of text area
  • Loading branch information
kusalananda authored May 24, 2022
2 parents 683488c + 949c23d commit c617552
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/components/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export const Cell = ({
spent_on: formatDate(date, dateFormat),
});
};
// Make sure that the the comment area is not visible and the row is no longer highlighted
const onBlurArea = () => {
setShowCommentArea(false);
onBlurRow();
};
return (
<div className="col-1 cell-container">
<label
Expand Down Expand Up @@ -121,7 +126,7 @@ export const Cell = ({
maxLength={1000}
onKeyUp={onEscapeArea}
onFocus={onFocusRow}
onBlur={() => setShowCommentArea(false)}
onBlur={onBlurArea}
defaultValue={areaComments !== null ? areaComments : comments}
/>
<button
Expand Down

0 comments on commit c617552

Please sign in to comment.