Skip to content

Merely selecting a block after load creates undo level #14766

@ellatrix

Description

To Reproduce

  1. Create a new post.
  2. Create a new paragraph with some text.
  3. Save the post.
  4. Reload the page.
  5. Select the paragraph block.
  6. Observe that the undo button is not disabled any longer.

Expected behavior

I don't expect block selection to create undo levels.

Additional context

I see the following actions when I select a block:

{type: "FETCH_REUSABLE_BLOCKS", id: undefined}
{type: "SELECT_BLOCK", initialPosition: null, clientId: "adb9ef30-61f7-45c3-b785-01fc5ca630e3"}
{type: "RECEIVE_REUSABLE_BLOCKS", results: Array(1)}
{type: "UPDATE_SETTINGS", settings: {}}
{type: "RECEIVE_BLOCKS", blocks: Array(1)}
{type: "RESET_EDITOR_BLOCKS", blocks: Array(1), shouldCreateUndoLevel: false}
{type: "FETCH_REUSABLE_BLOCKS_SUCCESS", id: undefined}

So it looks like it has something to do with reusable blocks fetching? Cc @noisysocks @aduth.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    [Feature] HistoryHistory, undo, redo, revisions, autosave.[Priority] HighUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions