Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Pressing delete at the beginning of a block (and NO merge) moves the focus to the wrong block #306

Closed

Description

@daniloercoli

Pressing delete at the beginning of a block can move the focus to the wrong block when the merge of the 2 blocks cannot happen due to different ("unmergeable") block types.

delete-focus-wrong

To reproduce this issue:

  • Start the demo app
  • Move the cursor at the beginning of the Para block Lorem...
  • Tap delete
  • You will the top "Page Break" block being selected, but the caret is still in the current block and the keyboard up

Note that in GB the standard behavior is to move the focus to the previous block if it's not mergeable. https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/store/effects.js#L165

This is not a problem of the onMerge code, but rather of the focus handling, since i can also replicate this with other steps. Link to the relevant ticket soon to arrive.

Activity

  1. added this to the Beta milestone on Nov 30, 2018
  2. koke commented on Dec 11, 2018

    @koke
    Member

    Is this one still valid after #308 was closed? What should be the desired behavior?
    Also, if this is for the beta (it's in that milestone) let's take it out of the list on #196 which is for the alpha.

  3. daniloercoli commented on Dec 11, 2018

    @daniloercoli
    ContributorAuthor

    Yes, just tested and the issue is still there, even though the behavior is slightly different.
    Will close this and open a new issue for the beta.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions