ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

Pasting via CTRL+V in the "text field"-popup doesn't work at first time opening

Open GhaliRasul opened this issue 3 years ago • 2 comments

Type of report

Bug

Provide detailed reproduction steps (if any)

When using the "Form Elements"-plugin and opening the "text field"-popup for the first time after reload, pasting text via CTRL + V doesn't paste the text from the clipboard as expected. But after closing and reopening the "text field"-popup pasting works as expected via CTRL+V

Steps to reproduce:

  1. Build the CKEditor online (Link: https://ckeditor.com/cke4/builder) and add the "Form Elements"-plugin
  2. Download and extract
  3. Navigate to the samples subdirectory
  4. Open the index.html
  5. Add a "text field"
  6. Try pasting in any field via CTRL + V

Expected result

The last copied entry in the clipboard should be added to the focused input field

Actual result

When opening the "text field"-popup for the first time and trying to paste vie CTRL + V the focus changes to the next input field and no text is pasted. After closing and reopening the "text field"-popup pasting works as expected

Other details

Bug is present in the newest version of the CKEditor (4.19.1) but was already present since at least version 4.14.1.

  • Browser: Google Chrome, Mozilla Firefox, Opera, Safari, Microsoft Edge (basically all)
  • OS: Windows, MacOS
  • CKEditor version: 4.19.1
  • Installed CKEditor plugins: Form Elements

GhaliRasul avatar Aug 19 '22 13:08 GhaliRasul

I can confirm the issue. It's visible in the "Text field" dialog. When inserting a new field, pressing Ctrl+V in any field will result in focusing the "Value" one but no paste occurs at all.

The bug is present only when trying to insert the first input in the editor. Each subsequent try works correctly.

Comandeer avatar Aug 23 '22 19:08 Comandeer

The issue is connected with the accesskey for the "Value" field: https://github.com/ckeditor/ckeditor4/blob/a7b0d54376a794f65bce64086bd5f6bb51cb02d9/plugins/forms/dialogs/textfield.js#L105

Comandeer avatar Aug 24 '22 10:08 Comandeer