Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and this project adheres to
- 🐛(frontend) fix legacy role computation #1376
- 🛂(frontend) block editing title when not allowed #1412
- 🐛(frontend) scroll back to top when navigate to a document #1406
- 🔒(frontend) prevent readers from changing callout emoji #1449

## [3.7.0] - 2025-09-12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ export const CalloutBlock = createReactBlockSpec(
{
render: ({ block, editor, contentRef }) => {
const [openEmojiPicker, setOpenEmojiPicker] = useState(false);
const isEditable = editor.isEditable;

const toggleEmojiPicker = (e: React.MouseEvent) => {
if (!isEditable) {
return;
}
e.preventDefault();
e.stopPropagation();
setOpenEmojiPicker(!openEmojiPicker);
Expand Down Expand Up @@ -65,9 +69,13 @@ export const CalloutBlock = createReactBlockSpec(
onClick={toggleEmojiPicker}
$css={css`
font-size: 1.125rem;
&:hover {
background-color: rgba(0, 0, 0, 0.1);
}
cursor: ${isEditable ? 'pointer' : 'default'};
${isEditable &&
`
&:hover {
background-color: rgba(0, 0, 0, 0.1);
}
`}
`}
$align="center"
$height="28px"
Expand Down
Loading