Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
daniloercoli opened this issue Nov 30, 2018 · 2 comments
Milestone

Comments

@daniloercoli
Copy link
Contributor

daniloercoli commented Nov 30, 2018

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.

@koke
Copy link
Member

koke commented Dec 11, 2018

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.

@daniloercoli
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants