- ๐บ๐ธUnited States Greg Boggs Portland Oregon
Anyone have any ideas on this one yet? The bar is super unpredictable if you click around in and out of the editor in certain ways, the box appears.
- Status changed to Needs review
over 1 year ago 5:56pm 15 June 2023 - last update
over 1 year ago Custom Commands Failed - ๐บ๐ธUnited States Tim Bozeman
Yeah that is some odd behavior.
I guess the behavior makes sense after reading _checkIfShouldBeSticky(). The editor needs focus, be scrolled beyond the view port, and the gotcha is that that calculation is triggered by the window scroll bar, not the dialog scroll bar.
I took a hard look at adding dialog support to
StickyPanelView
, but it seems tricky. The editor hasn't been attached whenStickyPanelView
runs. The text area is scrollable initially and once the editor is attached it makes the dialog scrollable. It's also weird trying to loop through the parents to determine if it's inside a scrollable div.Can we just add our dialog support to the ckeditor5 module?
- last update
over 1 year ago 28,526 pass - Status changed to Needs work
over 1 year ago 4:51pm 21 June 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
I think this can be accomplished with just CSS. For example, this takes care of it in Claro:
.ui-dialog .ck-editor__top { position: sticky; top: -1rem; }
I haven't checked other themes, but there's a chance the
top:
will need to be different as it will look best if it matches the padding of the dialog content area. - ๐บ๐ธUnited States Tim Bozeman
I think it would be an odd behavior to ignore the dialog scrollbar and only use the window scrollbar.
- ๐บ๐ธUnited States Tim Bozeman
Oh, well dang. Huhโฆ
ยฏ\_(ใ)_/ยฏ
Nice!
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
- Status changed to Needs review
over 1 year ago 12:21pm 22 June 2023 - last update
over 1 year ago 28,526 pass - Status changed to Needs work
over 1 year ago 1:14pm 22 June 2023 - ๐บ๐ธUnited States Tim Bozeman
oh hmm, actually something funky's going on with the focus now. Also, when did the editor area get its own scrollbar? That seems like a different approach to solve this too. Maybe we should not do a sticky toolbar at all and put a min-height on the editor area? - ๐ง๐ทBrazil mabho Rio de Janeiro, RJ
@Tim,
I have also experienced the issue with the focus within a Layout Builder modal.
It happens exactly as in your GIF sample.
The issue seems to be triggered because of the element with class `.ck-sticky-panel__content` that gets a new class `.ck-sticky-panel__content_sticky` when you focus on editor.
The problem is class `.ck-sticky-panel__content_sticky` carries `position: fixed; top: 0;`.
My quick solution for this is, on top of Greg's solution, applying this thing:
.ck-sticky-panel__content_sticky { position: absolute; }
- ๐บ๐ธUnited States Tim Bozeman
It looks like it's just being addressed upstream. ๐ค๐ผ
- Status changed to Closed: outdated
10 months ago 5:54pm 24 January 2024 - ๐บ๐ธUnited States Tim Bozeman
It looks like it's been addressed upstream and has made its way into core.