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

Can't copy selection in Embed, Custom HTML, Shortcode blocks #22775

Closed
desaiuditd opened this issue May 31, 2020 · 0 comments · Fixed by #22793
Closed

Can't copy selection in Embed, Custom HTML, Shortcode blocks #22775

desaiuditd opened this issue May 31, 2020 · 0 comments · Fixed by #22793
Assignees
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@desaiuditd
Copy link
Member

desaiuditd commented May 31, 2020

Describe the bug
In Embed blocks, copying the embed URL after selecting it in the placeholder is copying the whole block instead of just URL. Similarly, attempting to copy contents inside Custom HTML or Shortcode blocks result in the whole block being copied.

To reproduce
Steps to reproduce the behavior:

  1. Create a post in WordPress
  2. Copy any YouTube video URL e.g., https://www.youtube.com/watch?v=zFf_fcn0cI0
  3. Paste it into Block Editor. It will be converted into YouTube Embed Block.
  4. Click Edit icon.
  5. Click inside the URL input field.
  6. Select the whole URL.
  7. Press CMD+C (Mac. It can be CTRL+C in Windows/Linux)
  8. Observe that the whole embed block is copied instead of just the URL.

Expected behavior
Only the URL should have been copied, not the whole block.

Screencast
2020-05-31 02 51 38

Editor version (please complete the following information):

  • WordPress version: 5.4.1
  • Gutenberg plugin version: 8.2.0 & 8.2.1

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: 81.0.4044.138

Additional context
There are other reports for this as well, affecting custom HTML blocks. Ref: #22186 (comment)

@desaiuditd desaiuditd added the [Type] Bug An existing feature does not function as intended label May 31, 2020
@desaiuditd desaiuditd added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label May 31, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 1, 2020
@mcsf mcsf changed the title Copying url in Embed block placeholder is not working anymore. Can't copy selection in Embed, Custom HTML, Shortcode blocks Jun 1, 2020
mcsf added a commit that referenced this issue Jun 1, 2020
…tarea elements

Affects blocks such as Embed, Code, Custom HTML, Shortcode.

Fixes #22775
mcsf added a commit that referenced this issue Jun 4, 2020
…tarea elements

Affects blocks such as Embed, Code, Custom HTML, Shortcode.

Fixes #22775
mcsf added a commit that referenced this issue Jun 4, 2020
…textarea elements (#22793)

* CopyHandler: Fix unintended Copy override when copying from input/textarea elements

Affects blocks such as Embed, Code, Custom HTML, Shortcode.

Fixes #22775

* E2E: Extend "copy whole blocks" suite to cover Shortcode block
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... [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants