Skip to content

Commit

Permalink
fix(preview): Don't let preview options container overlay paragraph
Browse files Browse the repository at this point in the history
Otherwise the overlay container would catch all the click events.

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Sep 18, 2024
1 parent 83453e3 commit e40de87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Editor/PreviewOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ div[contenteditable=false] {

.preview-options-container {
position: absolute;
width: 0 !important;
left: -44px;
top: 50%;
transform: translate(0, -50%);
}

// Inside details, button needs to be shifted further
.details-content div[data-text-preview-options] {
.details-content .preview-options-container {
left: calc(-44px - 24px);
}

Expand Down
2 changes: 2 additions & 0 deletions src/css/prosemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ div.ProseMirror {
}

p {
position: relative;
margin-bottom: 1em;
line-height: 150%;
}
Expand Down Expand Up @@ -281,6 +282,7 @@ div.ProseMirror {
padding-left: 3px;

p {
position: relative;
margin-bottom: 0.5em;
}
}
Expand Down

0 comments on commit e40de87

Please sign in to comment.