-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StickyPanel behaves weird inside overflowed element #5465
Comments
Duplicate in the SO question: https://stackoverflow.com/questions/52512665/how-to-disable-sticky-toolbar-in-classic-editor-when-page-is-scrolled. |
@oleq Is it possible to fix by overriding something in my build ? |
confirmed |
This CSS would fix the issue |
Thanks @akhilxavierm , this works well. // default global
.ck .ck-sticky-panel .ck-sticky-panel__content_sticky {
position: static !important;
}
// blur
.ck-editor__top {
height: 1px;
overflow: hidden;
}
// focus
.ck-editor__top {
display: block;
height: 38.67px;
.ck-sticky-panel__placeholder {
display: none !important;
}
} |
We come up with issues, not sure if related to this or the many other issues I have read, where it just doesn't work properly if you don't use the overflow on the body element. But just using CSS sticky on the classic and document editors seems to have worked fine. I disabled the sticky panel by doing: editor.ui.view.stickyPanel.unbind('isActive');
editor.ui.view.stickyPanel.isActive = false; And added the following CSS (tailwind but self explanatory): .ck-editor__top {
@apply sticky top-0 z-10 !important;
}
.ck-sticky-panel__content {
@apply static !important;
} |
This issue is still reproducible on the master branch. Steps: .container { 2. Wrap the 3. Run the test with 4. Scroll inside the editor 5. Click outside of the editor and then click back inside the editor. The toolbar will appear at the top above the buttons and won't follow the scroll. This issue occurs in both Firefox and Safari. Screen.Recording.2023-06-26.at.10.41.45.mov |
The initial scope is timeboxed discovery for 2 solutions:
Option 1 sounds like a cheaper and UX-safer one. |
…ed-ancestors Fix (ui): Fixed the sticky panel behavior in overflowing containers. Closes #5465.
Hi!!! Oleq could you tell me please where can i find the solucion please?if has been realeased of course |
Thanks Witoso! but ArticlePluginSet is not officially available in the standard CKEditor5 packages as part of production modules, so why did you specify that? i paste the code here in case someone can help me please view form:
app.js:
app.css(This is crucial because if you look at the view, in the header.php there is the horizontal navigation bar, it is positioned above the ckeditor toolbar, the header tag has the id page-topbar and my navigation bar has the class navbar-header.I tried to fix it with css but nothing worked for me):
|
StickyPanel should listen to scroll event of all of its ancestors not only on the
window
object.The same as
BalloonPanelView
does: https://github.com/ckeditor/ckeditor5-ui/blob/beb9f96615da05f22166fb8ddfa7838333b1b61f/src/panel/balloon/balloonpanelview.js#L326-L340 (we can consider moving this listener from BPV to some util).Besides panel should take only the visible part of the limiter rect into consideration.
Now when classic editor is inside overflowed container then sticky top bar behaves weird.
The text was updated successfully, but these errors were encountered: