~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/common/codepress/engines/gecko.js

  • Committer: wagrant
  • Date: 2008-07-17 00:26:20 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:897
CodePress (Gecko engine): Whitelist some movement keys so they don't
      mark the editor dirty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        keyCode = evt.keyCode;  
41
41
                charCode = evt.charCode;
42
42
                fromChar = String.fromCharCode(charCode);
43
 
                for (var handler in this.changehandlers)
 
43
                // Arrow keys, Pg{Up,Dn}, Home, End won't mutate the content.
 
44
                if ([33, 34, 35, 36, 37, 38, 39, 40].indexOf(keyCode) == -1)
44
45
                {
45
 
                        document.changehandlers[handler]();
 
46
                        for (var handler in this.changehandlers)
 
47
                        {
 
48
                                document.changehandlers[handler]();
 
49
                        }
46
50
                }
47
51
 
48
52
                if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90)  { // shortcuts = ctrl||appleKey+shift+key!=z(undo)