WordPress.org

Make WordPress Core

Changeset 41385


Ignore:
Timestamp:
09/17/2017 03:57:09 AM (22 months ago)
Author:
westonruter
Message:

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

See #41850, #41879.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/code-editor.js

    r41384 r41385  
    180180        codemirror.on( 'blur', function() {
    181181            $textarea.data( 'next-tab-blurs', false );
    182         });
    183         codemirror.on( 'focus', function() {
    184             if ( codemirror.display.cursorDiv.scrollIntoViewIfNeeded ) {
    185                 codemirror.display.cursorDiv.scrollIntoViewIfNeeded();
    186             } else {
    187                 codemirror.display.cursorDiv.scrollIntoView();
    188             }
    189182        });
    190183        codemirror.on( 'keydown', function onKeydown( editor, event ) {
Note: See TracChangeset for help on using the changeset viewer.