Skip to content

Pasted image with block display type ignores alignment instructions #3071

Description

@florian-msft

Describe the bug
A pasted image that has display: block set on it ignores text alignment until it is selected.

To Reproduce
Steps to reproduce the behavior:

  1. Set the editor HTML to the following: <div style="text-align: center;"><img src="#" width="100" height="100" style="width: 100px; height: 100px; display: block;"></div>

Expected behavior
The image is centered and stays centered when selected

Actual behavior
The image is left aligned when unselected and centered when selected

Screenshots

rooster.mp4

Device Information

  • OS: Windows
  • Browser: Edge
  • Version: 137.0.3296.68

Additional context
This also affects right alignment. Clicking the image and clicking on align center or right has no effect until the image is selected.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions