r101915 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101914‎ | r101915 | r101916 >
Date:23:32, 3 November 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added more key codes for the Apple command key to catch firefox and right command on webkit
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js
@@ -110,10 +110,6 @@
111111 } );
112112 };
113113
114 -es.SurfaceView.prototype.hasSelection = function() {
115 - return !!this.selection.getLength();
116 -}
117 -
118114 es.SurfaceView.prototype.onMouseDown = function( e ) {
119115 if ( e.button === 0 /* left mouse button */ ) {
120116 this.mouse.selecting = true;
@@ -170,7 +166,9 @@
171167 case 18: // Alt
172168 this.keyboard.keys.alt = true;
173169 break;
174 - case 91: // Command
 170+ case 91: // Left Command in WebKit
 171+ case 93: // Right Command in WebKit
 172+ case 224: // Command in FireFox
175173 this.keyboard.keys.command = true;
176174 break;
177175 case 36: // Home
@@ -223,7 +221,9 @@
224222 case 18: // Alt
225223 this.keyboard.keys.alt = false;
226224 break;
227 - case 91: // Command
 225+ case 91: // Left Command in WebKit
 226+ case 93: // Right Command in WebKit
 227+ case 224: // Command in FireFox
228228 this.keyboard.keys.command = false;
229229 break;
230230 default:

Status & tagging log