Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.11.2
-
None
-
Unknown
-
N/A
-
N/A
-
Description
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.
Attachments
Issue Links
- causes
-
XWIKI-25607 Selecting text and applying formatting doesn't work as expected anymore in Wiki edit mode
-
- Closed
-
- is related to
-
WIKIEDITOR-107 Give the focus back to the editor after using a wiki editor toolbar button
-
- Open
-
- relates to
-
WIKIEDITOR-104 Update dependency org.webjars.npm:codemirror to v5.65.21
-
- Closed
-
-
XWIKI-25609 Keep the focus in the editor when clicking a wiki editor toolbar button
-
- Closed
-