Index: trunk/parsers/wikidom/lib/jquery.editSurface.js |
— | — | @@ -63,9 +63,11 @@ |
64 | 64 | } |
65 | 65 | } ) |
66 | 66 | .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 | + ); |
70 | 72 | } |
71 | 73 | if ( sel.active ) { |
72 | 74 | sel.end = getCursorPosition( e.pageX, e.pageY, $target ); |