Editor scrolling: Avoid jumping to the cursor when modifier and scrolling keys are pressed.
fixes #29485. git-svn-id: https://develop.svn.wordpress.org/trunk@29692 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
de3b2ccf19
commit
7716dae9fa
@ -195,6 +195,14 @@ jQuery( document ).ready( function($) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bail on special keys.
|
||||
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 ) ) {
|
||||
return;
|
||||
// OS keys, function keys, num lock, scroll lock
|
||||
} else if ( ( key >= 91 && key <= 93 ) || ( key >= 112 && key <= 123 ) || key === 144 || key === 145 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
cursorTop = offset.top + editor.iframeElement.getBoundingClientRect().top;
|
||||
cursorBottom = cursorTop + offset.height;
|
||||
cursorTop = cursorTop - buffer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user