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

Input Interaction: allow outer vertical edge to be selected #14453

Merged
merged 2 commits into from
Mar 15, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Mar 15, 2019

Description

Fixes #6164.

Currently, it is not possible to select the outer edge of a block vertically.

It's probably easier to understand by steps to reproduce:

  1. Insert one block and add some text.
  2. Place the caret in the middle.
  3. Press shift+arrowUp.

Expected: all text before the caret to be selected. Actual: nothing happens.

Solution: look whether there is a block before or after the current block before attempting multi-block selection. If there is none, the event should not be default prevented.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@ellatrix
Copy link
Member Author

Adding an e2e test in a bit.

@ellatrix ellatrix added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Mar 15, 2019
@ellatrix ellatrix force-pushed the try/allow-selecting-vertical-edge branch from 5bdb6d5 to 1146ad5 Compare March 15, 2019 14:05
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

@ellatrix ellatrix force-pushed the try/allow-selecting-vertical-edge branch from 1146ad5 to daba7a2 Compare March 15, 2019 15:14
@ellatrix ellatrix merged commit 39bd834 into master Mar 15, 2019
@ellatrix ellatrix deleted the try/allow-selecting-vertical-edge branch March 15, 2019 15:36
@jasmussen
Copy link
Contributor

😍✨

@youknowriad youknowriad added this to the 5.3 (Gutenberg) milestone Mar 18, 2019
youknowriad pushed a commit that referenced this pull request Mar 20, 2019
* Input Interaction: allow outer vertical edge to be selected

* Add e2e test
youknowriad pushed a commit that referenced this pull request Mar 20, 2019
* Input Interaction: allow outer vertical edge to be selected

* Add e2e test
@ellatrix ellatrix added the [Type] Bug An existing feature does not function as intended label Mar 28, 2019
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] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shift up in first text block should select to 1st character
4 participants