mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-02 19:08:47 +00:00
Prevent image clicking if not in editing mode
This commit is contained in:
@@ -66,3 +66,17 @@
|
|||||||
.ProseMirror.resize-cursor {
|
.ProseMirror.resize-cursor {
|
||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable image interaction when not in editing mode */
|
||||||
|
.mantine-RichTextEditor-root:not([data-editing]) .ProseMirror img {
|
||||||
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mantine-RichTextEditor-root:not([data-editing]) .node-image.ProseMirror-selectednode .image-component {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mantine-RichTextEditor-root:not([data-editing]) .node-image.ProseMirror-selectednode .image-resizer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -470,6 +470,7 @@ export default function NotesEditor({
|
|||||||
variant='subtle'
|
variant='subtle'
|
||||||
editor={editor}
|
editor={editor}
|
||||||
style={{ minHeight: '400px' }}
|
style={{ minHeight: '400px' }}
|
||||||
|
data-editing={isEditing || undefined}
|
||||||
>
|
>
|
||||||
{canEdit && isEditing && (
|
{canEdit && isEditing && (
|
||||||
<RichTextEditor.Toolbar sticky>
|
<RichTextEditor.Toolbar sticky>
|
||||||
@@ -631,7 +632,7 @@ export default function NotesEditor({
|
|||||||
</Paper>
|
</Paper>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
<Paper p='xs' shadow='sm' withBorder style={{ width: '200px' }}>
|
<Paper p='xs' shadow='sm' withBorder style={{ minWidth: '200px' }}>
|
||||||
<Stack gap='xs'>
|
<Stack gap='xs'>
|
||||||
{canEdit && (
|
{canEdit && (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user