Skip to content

fix(text-editor): ensure label click focuses editor#7755

Draft
tomdavies73 wants to merge 1 commit intomasterfrom
FE-7589
Draft

fix(text-editor): ensure label click focuses editor#7755
tomdavies73 wants to merge 1 commit intomasterfrom
FE-7589

Conversation

@tomdavies73
Copy link
Contributor

Proposed behaviour

When the TextEditor's label is clicked, the editor is focused.

Achieved by adding an internal click handler to the TextEditor's wrapper to listen to clicks on the component's label. This approach was preferred to adding a private onClick handler to the internal Label component.

Current behaviour

Currently, when the TextEditor's label is clicked, the editor is not focused.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

View any TextEditor story, click any label and see that the editor is focused.

DipperTheDan
DipperTheDan previously approved these changes Feb 5, 2026
DipperTheDan
DipperTheDan previously approved these changes Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants