[wp-trac] [WordPress Trac] #44820: CodeMirror in Customize - copy & paste bug

WordPress Trac noreply at wordpress.org
Thu Jul 18 05:33:26 UTC 2019


#44820: CodeMirror in Customize - copy & paste bug
-----------------------------+---------------------------------------------
 Reporter:  dionysous        |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Customize        |     Version:  4.9
 Severity:  minor            |  Resolution:
 Keywords:  has-patch        |     Focuses:  ui, javascript, administration
  needs-testing              |
-----------------------------+---------------------------------------------
Changes (by pento):

 * keywords:  reporter-feedback => has-patch needs-testing
 * milestone:  Awaiting Review => Future Release


Comment:

 Thank you for the additional information, @dionysous!

 I'm able to reproduce this bug consistently. In order to reproduce it, you
 need to to paste with `Cmd+V`, and release the `Cmd` key before releasing
 `V`.

 In `code-editor.js`, in the `wp.codeEditor.initialize` function, the
 `keyup` event is deciding to show the autocomplete dropdown because
 `isAlphaKey` is `true`.

 [attachment:44820.2.diff] fixes this issue, but I suspect that JS and HTML
 editing will have similar issues, too.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44820#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list