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

Handle copy for single block selection #4037

Merged
merged 1 commit into from Dec 25, 2017

Conversation

Projects
None yet
2 participants
@iseulde
Member

iseulde commented Dec 15, 2017

Description

This PR allows you to copy a single block.

How Has This Been Tested?

Select only one block, e.g. an image block. Copy using the copy shortcut. The contents should now be in the clipboard (try to paste somewhere else). Make sure copying a piece of text from a block still works.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@iseulde iseulde requested a review from mcsf Dec 15, 2017

@mcsf

This comment has been minimized.

Show comment
Hide comment
@mcsf

mcsf Dec 15, 2017

Contributor

This works well! I pushed a small refactor which you're free to reject. If you're OK with it, feel free to squash.

Perhaps add an inline comment explaining why we're bailing (e.g. we're inside a block but in an input, so we let the native stuff happen)?

Contributor

mcsf commented Dec 15, 2017

This works well! I pushed a small refactor which you're free to reject. If you're OK with it, feel free to squash.

Perhaps add an inline comment explaining why we're bailing (e.g. we're inside a block but in an input, so we let the native stuff happen)?

@iseulde

This comment has been minimized.

Show comment
Hide comment
@iseulde

iseulde Dec 18, 2017

Member

@mcsf updated the PR.

Member

iseulde commented Dec 18, 2017

@mcsf updated the PR.

@mcsf

mcsf approved these changes Dec 20, 2017

🚢

Show outdated Hide outdated editor/components/block-list/index.js Outdated

@iseulde iseulde merged commit ecee09e into master Dec 25, 2017

3 checks passed

codecov/project 39.08% (-0.03%) compared to 6a9ea01
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@iseulde iseulde deleted the fix/copy-single-block branch Dec 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment