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

Set focus on prior block after deleting multiple blocks #3558

Closed
jasmussen opened this issue Nov 20, 2017 · 4 comments
Closed

Set focus on prior block after deleting multiple blocks #3558

jasmussen opened this issue Nov 20, 2017 · 4 comments
Assignees
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

A classic text editing flow is the following:

  1. Type a bunch of text, many paragraphs
  2. Decide that some of those are crap, and select those paragraphs
  3. Press delete or backspace to delete them
  4. Then start typing again

Gutenberg is good as far steps 1-3 go. You can easily select multiple paragraphs, either with the keyboard or the mouse. Delete and backspace also work fine for deleting this text. But once you delete text, focus isn't set anywhere.

We have two options for improving this:

  1. Set focus on the preceding block. If that preceding block is a text block then ideally at the end of this text block
  2. Insert an empty text block with focus, then you can either use the slash command, start typing again, or press backspace to delete the empty block.

Thoughts?

@jasmussen jasmussen added Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement. [Type] Question Questions about the design or development of the editor. labels Nov 20, 2017
@karmatosed
Copy link
Member

I think 2 makes sense for the existing flows in Gutenberg and to take advantage of the slash command. I worry a little about empty text blocks and this being an issue for users, but I think the slash command functionality means this is the best option.

@karmatosed karmatosed removed Needs Design Feedback Needs general design feedback. [Type] Question Questions about the design or development of the editor. labels Jan 3, 2018
@jasmussen
Copy link
Contributor Author

As an addendum, since opening this ticket, we now have a "cursor indicator" even when you are isEditing. That is, if you're writing and outlines have faded out, if you arrow-key upwards into an image or gallery, that item has a black outline to indicate this is where the cursor/focus is, implying you can delete or backspace or press enter to create a linebreak after this.

Incidentally if we were able to set focus on the preceding block after deleting using backspace or delete, we could keep you in isEditing mode.

@mtias mtias added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Jan 5, 2018
@danielbachhuber danielbachhuber added this to the WordPress 5.0 milestone May 25, 2018
@talldan
Copy link
Contributor

talldan commented Aug 14, 2018

@jasmussen - I was working on #8961 and noticed this ticket. I think this is now resolved (both in master and on #8961). Happy for this to be closed?

I've noticed a couple of other separate issues related to deleting and I'll make new issues for those.

@jasmussen
Copy link
Contributor Author

Yaay, it's fixed indeed! Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants