Steps to reproduce
- Edit a page in Wiki mode, with Syntax Highlighting enabled
- Select a word and click the Bold button of the toolbar
- Click on another line of the content
- Type a letter
Expected results The cursor is displayed on the clicked line and the letter is typed there. Actual results No cursor is displayed, the letter is not typed, and several clicks are needed before typing works again. Cause The listener of the CodeMirror blur event restores the cursor, selection and scroll position, and the textarea change listener resets the editor content. Both run while CodeMirror still considers itself focused, so they give the focus back to the editor while CodeMirror then records itself as unfocused. Since the upgrade to CodeMirror 5.65.21 (WIKIEDITOR-104), clicking in the editor no longer repairs that state. |