Make WordPress Core

Ticket #29485: 29485.3.diff

File 29485.3.diff, 831 bytes (added by nacin, 11 years ago)
  • src/wp-admin/js/editor-expand.js

     
    195195                                return;
    196196                        }
    197197
     198                        // Bail on special keys.
     199                        if ( key <= 47 && ! ( key === VK.SPACEBAR || key === VK.ENTER || key === VK.DELETE || key === VK.BACKSPACE || key === VK.UP || key === VK.LEFT || key === VK.DOWN || key === VK.UP ) ) {
     200                                return;
     201                        // OS keys, function keys, num lock, scroll lock
     202                        } else if ( ( key >= 91 && key <= 93 ) || ( key >= 112 && key <= 123 ) || key === 144 || key === 145 ) {
     203                                return;
     204                        }
     205
    198206                        cursorTop = offset.top + editor.iframeElement.getBoundingClientRect().top;
    199207                        cursorBottom = cursorTop + offset.height;
    200208                        cursorTop = cursorTop - buffer;