r103873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103872‎ | r103873 | r103874 >
Date:23:53, 21 November 2011
Author:tparscal
Status:reverted (Comments)
Tags:
Comment:
Fixed breaks in a switch being inside ifs, causing them not to properly terminate the switch
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
@@ -354,13 +354,13 @@
355355 case 90: // z (undo)
356356 if ( e.ctrlKey ) {
357357 this.history.undo();
358 - break;
359358 }
 359+ break;
360360 case 89: // y (redo)
361361 if ( e.ctrlKey ) {
362362 this.history.redo();
363 - break;
364363 }
 364+ break;
365365 default: // Insert content (maybe)
366366 if ( this.keyboard.keydownTimeout ) {
367367 clearTimeout( this.keyboard.keydownTimeout );

Follow-up revisions

RevisionCommit summaryAuthorDate
r103879Reverted an issue in r103873 - fall through was intentionaltparscal01:25, 22 November 2011

Comments

#Comment by Yair rand (talk | contribs)   01:07, 22 November 2011

The breaks inside the ifs weren't deliberate? I thought they were there so that if the ctrlKey isn't pressed, it will continue on to the default behavior. With the breaks outside the ifs, won't the z and y keys not work?

Status & tagging log