https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112168

Revision: 112168
Author:   inez
Date:     2012-02-23 00:08:34 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Use flag 'isime' to correctly detect keyboard input in firefox.

Modified Paths:
--------------
    trunk/extensions/VisualEditor/playground/playground.js

Modified: trunk/extensions/VisualEditor/playground/playground.js
===================================================================
--- trunk/extensions/VisualEditor/playground/playground.js      2012-02-22 
23:53:51 UTC (rev 112167)
+++ trunk/extensions/VisualEditor/playground/playground.js      2012-02-23 
00:08:34 UTC (rev 112168)
@@ -43,14 +43,14 @@
 };
 
 app.prototype.onKeyPress = function() {
-       console.log("onKeyPress");
+       //console.log("onKeyPress");
 };
 
 app.prototype.onKeyUp = function() {
        //console.log("onKeyUp");
        if ( this.inime ) {
                this.inime = false;
-               console.log("inime = false");
+               //console.log("inime = false");
        }
 };
 
@@ -59,7 +59,7 @@
        //console.log("onKeyDown");
        if ( e.which === 229 ) {
                this.inime = true;
-               console.log("inime = true");
+               //console.log("inime = true");
        }
 };
 
@@ -79,7 +79,7 @@
                //console.log(text);
                
                if(this.keydown || this.inime) {
-                       //console.log("change from keyboard");
+                       console.log("change from keyboard");
                        // we are going to need a cursor position
                        var selection = rangy.getSelection();
                        var offset = this.getOffset( selection.anchorNode, 
selection.anchorOffset );
@@ -87,14 +87,11 @@
                        //console.log("diffLength: " + diffLength);
                        
                        if ( diffLength > 0 ) {
-                               console.log( text.substring(offset - 
diffLength, offset) );     
+                               //console.log( text.substring(offset - 
diffLength, offset) );   
                        } else if ( diffLength === 0 ) {
-                               console.log( text.substring(offset - 1, offset) 
);
+                               //console.log( text.substring(offset - 1, 
offset) );
                        }
-                       
-                       
-                       
-                       
+
                } else {
                        console.log("change not from keyboard");
                        // find a change and commit to the model


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to