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

Block Bindings: Pressing Enter from connected block doesn't move focus to the newly created block. #58674

Closed
afercia opened this issue Feb 5, 2024 · 2 comments · Fixed by #59320
Assignees
Labels
[Feature] Block bindings [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Feb 5, 2024

Description

One of the most established interaction conventions in the Editor is that pressing Enter at the end of a block creates a new default block i.e. a Paragraph and moves focus to the newsly created Paragraph.

Bound (connected) blocks seem to break this long established interaction. When pressing Enter:

  • The new Paragraph is created.
  • Focus is not moved.

Animated GIF to better illustrate:

focus not moved

Step-by-step reproduction instructions

  • Add a normal Paragraph block.
  • Follow instructions from Add the Block Bindings API wordpress-develop#5888 to create a Paragraph with content connected to a post meta.
  • Click the first Paragraph and move the cusror at the end of its content.
  • Press Enter.
  • Observe a new Paragraph is created and receives focus.
  • Click the connected Paragraph.
  • Observe the Paragraph is selected.
  • Press Enter.
  • Observe a new Paragraph is created but focus is not moved to it.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Block bindings labels Feb 5, 2024
@artemiomorales artemiomorales self-assigned this Feb 9, 2024
@colorful-tones
Copy link
Member

@artemiomorales we're going through the WordPress 6.5 Editor Tasks board, and I see you self-assigned this task. Are you able to provide an update on any progress or discovery around this issue please?

@artemiomorales
Copy link
Contributor

artemiomorales commented Feb 13, 2024

@colorful-tones Thanks for the ping! I've been on this bug for a couple of days and am feeling a bit stuck, though I've just created a draft pull request (still not working yet) to facilitate discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block bindings [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants