Index: trunk/extensions/VisualEditor/playground/playground.js |
— | — | @@ -43,14 +43,14 @@ |
44 | 44 | };
|
45 | 45 |
|
46 | 46 | app.prototype.onKeyPress = function() {
|
47 | | - console.log("onKeyPress");
|
| 47 | + //console.log("onKeyPress");
|
48 | 48 | };
|
49 | 49 |
|
50 | 50 | app.prototype.onKeyUp = function() {
|
51 | 51 | //console.log("onKeyUp");
|
52 | 52 | if ( this.inime ) {
|
53 | 53 | this.inime = false;
|
54 | | - console.log("inime = false");
|
| 54 | + //console.log("inime = false");
|
55 | 55 | }
|
56 | 56 | };
|
57 | 57 |
|
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | //console.log("onKeyDown");
|
61 | 61 | if ( e.which === 229 ) {
|
62 | 62 | this.inime = true;
|
63 | | - console.log("inime = true");
|
| 63 | + //console.log("inime = true");
|
64 | 64 | }
|
65 | 65 | };
|
66 | 66 |
|
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | //console.log(text);
|
81 | 81 |
|
82 | 82 | if(this.keydown || this.inime) {
|
83 | | - //console.log("change from keyboard");
|
| 83 | + console.log("change from keyboard");
|
84 | 84 | // we are going to need a cursor position
|
85 | 85 | var selection = rangy.getSelection();
|
86 | 86 | var offset = this.getOffset( selection.anchorNode, selection.anchorOffset );
|
— | — | @@ -87,14 +87,11 @@ |
88 | 88 | //console.log("diffLength: " + diffLength);
|
89 | 89 |
|
90 | 90 | if ( diffLength > 0 ) {
|
91 | | - console.log( text.substring(offset - diffLength, offset) );
|
| 91 | + //console.log( text.substring(offset - diffLength, offset) );
|
92 | 92 | } else if ( diffLength === 0 ) {
|
93 | | - console.log( text.substring(offset - 1, offset) );
|
| 93 | + //console.log( text.substring(offset - 1, offset) );
|
94 | 94 | }
|
95 | | -
|
96 | | -
|
97 | | -
|
98 | | -
|
| 95 | +
|
99 | 96 | } else {
|
100 | 97 | console.log("change not from keyboard");
|
101 | 98 | // find a change and commit to the model
|