r92097 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92096‎ | r92097 | r92098 >
Date:21:00, 13 July 2011
Author:inez
Status:deferred
Tags:
Comment:
Handle keydown and keyup events on document instead of on surface
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.Surface.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Surface.js
@@ -51,12 +51,6 @@
5252 this.$input = $( '<input class="editSurface-input" />' )
5353 .prependTo( this.$ )
5454 .bind({
55 - 'keydown' : function( e ) {
56 - return surface.onKeyDown( e );
57 - },
58 - 'keyup' : function( e ) {
59 - return surface.onKeyUp( e );
60 - },
6155 'focus' : function() {
6256 $(document).bind({
6357 'mousemove.es' : function(e) {
@@ -64,12 +58,21 @@
6559 },
6660 'mouseup.es' : function(e) {
6761 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+ },
6970 });
7071 },
7172 'blur': function( e ) {
7273 $(document).unbind('mousemove.es');
7374 $(document).unbind('mouseup.es');
 75+ $(document).unbind('keydown.es');
 76+ $(document).unbind('keyup.es');
7477 surface.cursor.hide();
7578 }
7679 });

Status & tagging log