Code Editor: Remove `scrollIntoView` of editor's cursor line upon focus to prevent jumping issues for editor scroll position.

See #41850, #41879.


git-svn-id: https://develop.svn.wordpress.org/trunk@41385 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-09-17 03:57:09 +00:00
parent dced797c3f
commit 2d1ac710e2
1 changed files with 0 additions and 7 deletions

View File

@ -180,13 +180,6 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
codemirror.on( 'blur', function() {
$textarea.data( 'next-tab-blurs', false );
});
codemirror.on( 'focus', function() {
if ( codemirror.display.cursorDiv.scrollIntoViewIfNeeded ) {
codemirror.display.cursorDiv.scrollIntoViewIfNeeded();
} else {
codemirror.display.cursorDiv.scrollIntoView();
}
});
codemirror.on( 'keydown', function onKeydown( editor, event ) {
var tabKeyCode = 9, escKeyCode = 27;