r103952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103951‎ | r103952 | r103953 >
Date:20:11, 22 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Fix bug in deletion: callback for traverseUpstream should get parent of current node, not of the node from which traversal started.
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
@@ -447,7 +447,7 @@
448448 var nodeToDelete = sourceNode;
449449 es.DocumentNode.traverseUpstream( nodeToDelete, function( node ) {
450450 if ( node.getParent().children.length === 1 ) {
451 - nodeToDelete = sourceNode.getParent();
 451+ nodeToDelete = node.getParent();
452452 } else {
453453 return false;
454454 }

Status & tagging log