editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

Issue: toolbars causing unwanted vertical scrolls

Open VikhorKonstantin opened this issue 1 year ago • 4 comments

Describe a bug.

Steps to reproduce:

https://github.com/codex-team/editor.js/assets/52427793/c43dbb03-806b-4c58-b12c-84980b530c70 You can see that after I deleted inner toolbar element, scroll disappeared This happens because toolbars are still taking some space, despite the position: absolute and visibility: hidden

image Moreover, I'm expecting to see the displayed toolbox to be over the element with the red border, not to be hidden under it (maybe this is not always the expected behavior, so this is can be a configurable option), because in my experience usually different types of tooltips and floating menus are allowed to be drawn outside the related containers and they definitely shouldn't force them to grow/scroll All this can be achieved by rendering toolbars under some special element under document's body, then we should just carefully position them. For sure it will also require some other changes like to make sure that click under these toolbars are not treated as clicks outside of the editor and etc. image This is pretty much the same thing TinyMCE do with their toolbars: they are rendering toolbars outside of the editor's container, under some special element under document's body It allows them to render their toolbar fully visible even if the toolbar is bigger than the maximum height available for the editor.

Browser, OS: Windows, Chrome

Editor.js version: 2.29.1

VikhorKonstantin avatar Feb 29 '24 08:02 VikhorKonstantin

can i work on this bug?

SEEDART007 avatar Mar 22 '24 23:03 SEEDART007

can i work on this bug?

Right now we're working on unifying all toolbars by the Popover component. It seems like this feature should be implemented inside the Popover. You can take a look and try to suggest your PR.

neSpecc avatar Mar 23 '24 11:03 neSpecc

Any fix for this bug? I have the same issue when the menu open in a overflow container. Do you have any method to change the position for the menu? Thanks

You can see the issue in the gif editor

MasterTheRock avatar Jan 06 '25 21:01 MasterTheRock

I have the same issue when I try to include the editor in a dialog.

adamtrll avatar Feb 06 '25 10:02 adamtrll