r89756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89755‎ | r89756 | r89757 >
Date:23:28, 8 June 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed bug - only need to find target when selecting is active.
Modified paths:
  • /trunk/parsers/wikidom/lib/jquery.editSurface.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/jquery.editSurface.js
@@ -63,13 +63,13 @@
6464 }
6565 } )
6666 .mousemove( function( e ) {
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 - );
72 - }
7367 if ( sel.active ) {
 68+ var $target = $( e.target );
 69+ if ( !$target.is( '.editSurface-line' ) ) {
 70+ $target = sel.start.$target.parent().children().closestToOffset(
 71+ { 'left': e.pageX, 'top': e.pageY }
 72+ );
 73+ }
7474 sel.end = getCursorPosition( e.pageX, e.pageY, $target );
7575 if ( sel.start.line < sel.end.line
7676 || ( sel.start.line === sel.end.line

Status & tagging log