mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
TinyMCE wpView: exclude more non-printable keyCodes in isSpecialKey(), fixes #29115
Built from https://develop.svn.wordpress.org/trunk@29606 git-svn-id: http://core.svn.wordpress.org/trunk@29380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6a734800a7
commit
a2ad27c03e
@ -354,11 +354,13 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
});
|
||||
|
||||
// Excludes arrow keys, delete, backspace, enter, space bar.
|
||||
// Ref: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode
|
||||
function isSpecialKey( key ) {
|
||||
return ( ( key <= 47 && key !== VK.SPACEBAR && key !== VK.ENTER && key !== VK.DELETE && key !== VK.BACKSPACE && ( key < 37 || key > 40 ) ) ||
|
||||
key === 144 || key === 145 || // Num Lock, Scroll Lock
|
||||
key >= 224 || // OEM or non-printable
|
||||
( key >= 144 && key <= 150 ) || // Num Lock, Scroll Lock, OEM
|
||||
( key >= 91 && key <= 93 ) || // Windows keys
|
||||
( key >= 112 && key <= 123 ) ); // F keys
|
||||
( key >= 112 && key <= 135 ) ); // F keys
|
||||
}
|
||||
|
||||
// (De)select views when arrow keys are used to navigate the content of the editor.
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user