Skip to content

Commit

Permalink
Improve toolbar positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 25, 2024
1 parent e8cb9c8 commit a9cbf20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion private/css/cms.tiptap.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@
font-size: 1rem;
font-weight: normal;
visibility: hidden;
position: absolute;
position: sticky;
inset-inline-start: 0;
inset-inline-end: auto;
width: auto;
top: 48px; /* Keep below toolbar */
pointer-events: all;
display: flex;
flex-flow: row wrap;
Expand Down
2 changes: 1 addition & 1 deletion private/js/cms.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class CmsForm {
const el_pos = this.el.getBoundingClientRect();
if (options.x > el_pos.width/2) {
this.dialog.classList.add("right");
this.dialog.style.right = (el_pos.width - options.x - 35) + 'px';
this.dialog.style.right = (options.x - el_pos.width - 5) + 'px';
} else {
this.dialog.style.left = (options.x - el_pos.x - 25) + 'px';
}
Expand Down

0 comments on commit a9cbf20

Please sign in to comment.