Skip to content

Commit

Permalink
Fix: Ballon toolbar only if enough space
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 24, 2024
1 parent c4054db commit 262be7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion private/js/cms.tiptap.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ class CMSTipTapPlugin {
}
});
this._editors[el.id] = editor;
if (el.tagName === 'TEXTAREA') {
const el_rect = el.getBoundingClientRect();

if (el.tagName === 'TEXTAREA' || el_rect.x < 32) {
// Not inline
this._createTopToolbar(editorElement, editor, options);
if (el.rows) {
Expand Down

0 comments on commit 262be7f

Please sign in to comment.