https://docs.ckeditor.com/ckeditor5/latest/framework/guides/ui/external-ui.html
Try changing a heading in the editor showcased on this page.
It's a known problem and probably without any sane solution.
It is most certainly caused by Bootstrap which comes with a JS code that scrolls the web page when the dropdown item is selected. Look for focus() in this file鈥攊t's a mess to read but it clearly focuses things in DOM. It makes sense most of the time but when ran in an iframe, it gives us this weird behavior.
What we could do:
ATM I'm for 3 but let's wait for other ideas before we "wontfix" it.
Can we also restore the previous scroll position? We've done that in the past with similar issues.
I'm OK with restoring the position unless it makes the web page flicker.
Well, I'd be fine with just ignoring it, but developer reading the docs would not know that this is a Bootstrap "problem" not a bug in CKE. So I am fine with leaving it as is but adding a note about it.
@AnnaTomanek?
I'm fine with leaving a note, sure. Is there ANY chance that it's going to be fixed, do we have any open issue to link to? Or is this rather a wontfix thing and that's it?
I don't think that there's a bug report and I don't think that there's a chance that it will be fixed. I wouldn't investigate this further cause it's just a sample for us. A hack or a note will be enough.
I'll give it a try. If a simple hack does not work, I'll just leave a comment.
Most helpful comment
I'll give it a try. If a simple hack does not work, I'll just leave a comment.