Skip to content

Commit

Permalink
Merge pull request #300 from AppQuality/develop
Browse files Browse the repository at this point in the history
Fix editable comments in chat
  • Loading branch information
marcbon authored Jan 19, 2024
2 parents b7dfea9 + 80ecdeb commit bb0ce39
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/stories/chat/parts/comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ const CommentCard = styled(Card)`
`;

const ReadOnly = styled.div`
cursor: text;
> div {
background-color: ${({ theme }) => theme.palette.grey[100]};
&:focus {
box-shadow: none;
outline: none;
}
background-color: transparent;
padding: 0;
}
`;
Expand Down Expand Up @@ -66,6 +64,10 @@ export const Comment = ({

if (!ed) return null;

ed.setOptions({
editable: false,
});

return (
<CommentCard>
<AuthorContainer>
Expand Down
1 change: 0 additions & 1 deletion src/stories/chat/parts/containers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const EditorContainer = styled(FauxInput)<{ editable: boolean }>`
: `
margin-left: ${theme.space.sm};
padding: ${`${theme.space.xxs} ${theme.space.xs}`};
`}
.ProseMirror {
Expand Down
4 changes: 2 additions & 2 deletions src/stories/shared/editorStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ export const editorStyle = css`
`;

export const readOnlyStyle = css`
pointer-events: none;
border: none;
outline: none;
.ProseMirror {
background: transparent;
border: none;
Expand Down

0 comments on commit bb0ce39

Please sign in to comment.