[Plugin SharedSpace] Inline editor buttons not disappearing when saving comments

We use the inline editor with ckeditor plugin SharedSpace. (For accessibility reasons we don’t like jumping editor buttons.)

Therefor we add in the admin pages in ckeditor config:

config.sharedSpaces = {
    top: 'cke_anchor'

That #cke_anchor had this style:

/* Inline-Editor soll oben sticky sein - #cke_anchor ist selbst erzeugt */
#cke_anchor {
    position: sticky;
    top: 0;
    margin-left: -2px;
    z-index: 1;

The #cke_anchor itself is created this way:

// DIV für Inline-Editor erzeugen für das Plugin 'sharedspace'
try {
  let wikiparent = document.querySelector("#xwikicontent");
  let newDiv = document.createElement("div");
  newDiv.id = "cke_anchor";
  wikiparent.insertAdjacentElement('beforebegin', newDiv);
} catch (e) {
  console.log('Konnte keinen Achor-DIV für Inline-Editor erstellen')

While editing articles inline everything is fine and editor buttons appears. When saving editor buttons disappears.

When writing a comment inline editor buttons appears but does not disappear when saving. Only reload of the page makes the buttons disappear.

I know that this is a bit tricky. Which component is messing around? Could be SharedSpace or CKEditor or XWiki or we with our js or css.

Any idea?
Regards, Simpel

PS: Opened an issue at CKEditor4 - [SharedSpace] Inline editor buttons not disappearing when saving comments in XWiki · Issue #5045 · ckeditor/ckeditor4 · GitHub

Hi, it would be easier to understand the problem if you provided some screenshots or some video.


Here is a video about this: https://simpel.cc/temp/sharedspace.mp4.

I disabled sharedspace for testing and saw while writing a comment that inline editor has another look. It looked much more compact with a border around the whole editing section.

BTW: ckeditor4 closed my github issue, as this they called a 3rd-party-issue.

What I see in the video is definitely a bug: the “Comment” button shouldn’t trigger the in-place edit of the wiki page content. But I cannot reproduce on XWiki 13.10.2 (LTS) and neither on XWiki 14.0RC1 so either this was fixed in the past or it is caused by some changes you have on your XWiki instance.