Index: trunk/parsers/wikidom/lib/es/es.Surface.js |
— | — | @@ -51,12 +51,6 @@ |
52 | 52 | this.$input = $( '<input class="editSurface-input" />' ) |
53 | 53 | .prependTo( this.$ ) |
54 | 54 | .bind({ |
55 | | - 'keydown' : function( e ) { |
56 | | - return surface.onKeyDown( e ); |
57 | | - }, |
58 | | - 'keyup' : function( e ) { |
59 | | - return surface.onKeyUp( e ); |
60 | | - }, |
61 | 55 | 'focus' : function() { |
62 | 56 | $(document).bind({ |
63 | 57 | 'mousemove.es' : function(e) { |
— | — | @@ -64,12 +58,21 @@ |
65 | 59 | }, |
66 | 60 | 'mouseup.es' : function(e) { |
67 | 61 | return surface.onMouseUp( e ); |
68 | | - } |
| 62 | + }, |
| 63 | + 'keydown.es' : function( e ) { |
| 64 | + console.log('kd'); |
| 65 | + return surface.onKeyDown( e ); |
| 66 | + }, |
| 67 | + 'keyup.es' : function( e ) { |
| 68 | + return surface.onKeyUp( e ); |
| 69 | + }, |
69 | 70 | }); |
70 | 71 | }, |
71 | 72 | 'blur': function( e ) { |
72 | 73 | $(document).unbind('mousemove.es'); |
73 | 74 | $(document).unbind('mouseup.es'); |
| 75 | + $(document).unbind('keydown.es'); |
| 76 | + $(document).unbind('keyup.es'); |
74 | 77 | surface.cursor.hide(); |
75 | 78 | } |
76 | 79 | }); |