Token browser loses editor focus

Created on 20 February 2023, over 1 year ago
Updated 30 November 2023, 11 months ago

Problem/Motivation

Inserting tokens from token browser into CKEditor 5.

Steps to reproduce

Pre-requisites:
A text format with CKEditor 5 configured as the text editor (admin/config/content/formats)

1. Edit Basic Page body field: /admin/structure/types/manage/page/fields/node.page.body
2. Under default value, ensure the CKEditor 5 is displaying.
3. Position cursor in Default value text area.
4. Click: "Browse available tokens."
5. Click on a token to insert it.
Expected: Token is inserted into Default body value.
Actual: Popup with "First click a text field to insert your tokens into." is displayed.

Performing the same steps with a text format that isn't configured with CKEditor 5 results in the token being successfully inserted.

Additionally, if you position the cursor in another field and perform the above steps, then the token will be inserted into the other field.

Proposed resolution

Ensure the form element/selector is correctly set when the cursor is positioned in the CKeditor text area.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

🐛 Bug report
Status

Closed: works as designed

Version

9.5

Component
CKEditor 5 

Last updated 3 days ago

Created by

🇬🇧United Kingdom oliverpolden

Live updates comments and jobs are added and updated live.
  • JavaScript

    Affects the content, performance, or handling of Javascript.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024