Regression caused by XWIKI-22034. It seems the fix from XWIKI-22415 wasn't enough because, surprisingly, editor.isDetached() return false when the rich text area is detached. The problem is that when the CKEditor instance is moved (drag & dropped) the iframe used to implement the editing area is detached which destroys the inner document. After the CKEditor is dropped the iframe is reattached and the content is reloaded (async). XWIKI-22034 added a data listener that checks the current selection. The selection is bound to the window, and there's no window if the iframe is detached. So this listener fails if called while the editor is drag & dropped, or soon after the editor is dropped, before the iframe is reloaded. I was expecting editor.isDetached() to take this use case into account, or at least to have editor.getSelection() return null when there's no selection because the editor is detached. Instead, editor.getSelection() throws an exception if the rich text area's iframe is detached. I need to bulletproof my code it seems.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.