Index: trunk/parsers/wikidom/lib/hype/views/es.SurfaceView.js |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | $document = $( document ); |
41 | 41 | |
42 | 42 | // MouseDown on surface |
43 | | - this.$.bind( { |
| 43 | + this.$.on( { |
44 | 44 | 'mousedown' : function(e) { |
45 | 45 | return surfaceView.onMouseDown( e ); |
46 | 46 | } |
— | — | @@ -48,11 +48,11 @@ |
49 | 49 | // Hidden input |
50 | 50 | this.$input = $( '<input class="editSurface-input" />' ) |
51 | 51 | .prependTo( this.$ ) |
52 | | - .bind( { |
| 52 | + .on( { |
53 | 53 | 'focus' : function() { |
54 | 54 | //console.log("focus"); |
55 | | - $document.unbind( '.editSurface' ); |
56 | | - $document.bind({ |
| 55 | + $document.off( '.editSurface' ); |
| 56 | + $document.on({ |
57 | 57 | 'mousemove.editSurface' : function(e) { |
58 | 58 | //return surfaceView.onMouseMove( e ); |
59 | 59 | }, |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | }, |
71 | 71 | 'blur': function( e ) { |
72 | 72 | //console.log("blur"); |
73 | | - $document.unbind( '.editSurface' ); |
| 73 | + $document.off( '.editSurface' ); |
74 | 74 | surfaceView.hideCursor(); |
75 | 75 | } |
76 | 76 | } ).focus(); |