Make WordPress Core

Changeset 29606


Ignore:
Timestamp:
08/25/2014 08:40:21 PM (12 years ago)
Author:
azaozz
Message:

TinyMCE wpView: exclude more non-printable keyCodes in isSpecialKey(), fixes #29115

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js

    r29535 r29606  
    355355
    356356        // Excludes arrow keys, delete, backspace, enter, space bar.
     357        // Ref: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode
    357358        function isSpecialKey( key ) {
    358359                return ( ( key <= 47 && key !== VK.SPACEBAR && key !== VK.ENTER && key !== VK.DELETE && key !== VK.BACKSPACE && ( key < 37 || key > 40 ) ) ||
    359                         key === 144 || key === 145 || // Num Lock, Scroll Lock
     360                        key >= 224 || // OEM or non-printable
     361                        ( key >= 144 && key <= 150 ) || // Num Lock, Scroll Lock, OEM
    360362                        ( key >= 91 && key <= 93 ) || // Windows keys
    361                         ( key >= 112 && key <= 123 ) ); // F keys
     363                        ( key >= 112 && key <= 135 ) ); // F keys
    362364        }
    363365
Note: See TracChangeset for help on using the changeset viewer.