Code Editor: Remove scrollIntoView of editor's cursor line upon focus to prevent jumping issues for editor scroll position.
See #41850, #41879. Built from https://develop.svn.wordpress.org/trunk@41385 git-svn-id: http://core.svn.wordpress.org/trunk@41218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user