r89754 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89753‎ | r89754 | r89755 >
Date:22:50, 8 June 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed regression - dragging selection outside paragraph causing updates to selection.
Modified paths:
  • /trunk/parsers/wikidom/lib/jquery.editSurface.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/jquery.editSurface.js
@@ -63,9 +63,11 @@
6464 }
6565 } )
6666 .mousemove( function( e ) {
67 - var $target = undefined;
68 - if ( $( e.target ).is( '.editSurface-line' ) ) {
69 - $target = $( e.target );
 67+ var $target = $( e.target );
 68+ if ( !$target.is( '.editSurface-line' ) ) {
 69+ $target = sel.start.$target.parent().children().closestToOffset(
 70+ { 'left': e.pageX, 'top': e.pageY }
 71+ );
7072 }
7173 if ( sel.active ) {
7274 sel.end = getCursorPosition( e.pageX, e.pageY, $target );

Status & tagging log