From 5346347de7819ae7f9eef6e2793231e5514401bf Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 23 Sep 2017 18:45:49 +0000 Subject: [PATCH] Customize: Remove unnecessary call to `refresh()` a CodeMirror instance upon `focus` in Code Editor control. This also fixes an issue with the cursor not being set in the expected location with an `inputStyle=contenteditable`. Props afercia. See #41897. Fixes #41900. git-svn-id: https://develop.svn.wordpress.org/trunk@41582 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index c80ef86e52..58f9cb07ac 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -3781,11 +3781,6 @@ control.editor = wp.codeEditor.initialize( $textarea, settings ); - // Refresh when receiving focus. - control.editor.codemirror.on( 'focus', function( codemirror ) { - codemirror.refresh(); - }); - /* * When the CodeMirror instance changes, mirror to the textarea, * where we have our "true" change event handler bound.