Skip to content

[lexical-playground] Bug Fix: Update alignment state for image selection#7627

Merged
etrepum merged 1 commit intofacebook:mainfrom
bgwebagency:fix/image-alignment-toolbar-update
Jun 17, 2025
Merged

[lexical-playground] Bug Fix: Update alignment state for image selection#7627
etrepum merged 1 commit intofacebook:mainfrom
bgwebagency:fix/image-alignment-toolbar-update

Conversation

@kirandash
Copy link
Copy Markdown
Contributor

Description

Current behavior:
When an image is selected in the editor, changing its alignment using the toolbar does not update the alignment button in the toolbar. The alignment state only updates correctly for text selections.

Behavior after this PR:
The toolbar alignment button now correctly reflects the current alignment of the selected image. When an image is selected and its alignment is changed, the toolbar updates to show the new alignment, consistent with how it works for text.

Closes #7622

Test plan

Before

  • Select an image in the editor.
  • Change its alignment using the toolbar.
  • The alignment button in the toolbar does not update to reflect the new alignment.
    image

After

  • Select an image in the editor.
  • Change its alignment using the toolbar.
  • The alignment button in the toolbar does update to reflect the new alignment.
    image

Ensure the toolbar alignment button reflects the current alignment when an image is selected and its alignment is changed
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 2:55pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 2:55pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 16, 2025
@lilshady
Copy link
Copy Markdown
Contributor

lgtm

@etrepum etrepum added this pull request to the merge queue Jun 17, 2025
Merged via the queue into facebook:main with commit 24d2ee6 Jun 17, 2025
40 checks passed
@etrepum etrepum mentioned this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: align does not update when an image is active

4 participants