mediawiki.action.edit.stash: Document ignored key codes
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 1 Jul 2016 21:09:20 +0000 (22:09 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 1 Jul 2016 21:09:20 +0000 (22:09 +0100)
Follows-up eca800c7f02.

Change-Id: Ic0d9620eb3a5e371cc9825248ebb40abb0dea965

resources/src/mediawiki.action/mediawiki.action.edit.stash.js

index da27d20..07c7d76 100644 (file)
                function onTextKeyUp( e ) {
                        // Ignore keystrokes that don't modify text, like cursor movements.
                        // See <http://www.javascripter.net/faq/keycodes.htm> and
-                       // <http://www.quirksmode.org/js/keys.html>. We don't have to be
-                       // exhaustive, because the cost of misfiring is low.
+                       // <http://www.quirksmode.org/js/keys.html>. We don't have to be exhaustive,
+                       // because the cost of misfiring is low.
+                       // * Key code 33-40: Page Up/Down, End, Home, arrow keys.
+                       // * Key code 16-18: Shift, Ctrl, Alt.
                        if ( ( e.which >= 33 && e.which <= 40 ) || ( e.which >= 16 && e.which <= 18 ) ) {
                                return;
                        }