Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | array( |
155 | 155 | 'src' => 'js/plugins/jquery.wikiEditor.js', |
156 | 156 | 'class' => 'j.wikiEditor', |
157 | | - 'version' => 57 |
| 157 | + 'version' => 58 |
158 | 158 | ), |
159 | 159 | array( |
160 | 160 | 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', |
— | — | @@ -191,10 +191,10 @@ |
192 | 192 | 'version' => 1 ), |
193 | 193 | ), |
194 | 194 | 'combined' => array( |
195 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 164 ), |
| 195 | + array( 'src' => 'js/plugins.combined.js', 'version' => 165 ), |
196 | 196 | ), |
197 | 197 | 'minified' => array( |
198 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 164 ), |
| 198 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 165 ), |
199 | 199 | ), |
200 | 200 | ), |
201 | 201 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -608,7 +608,8 @@ |
609 | 609 | // (usually inside the <body> between two <br>s). Go to the rightmost |
610 | 610 | // child of the node just before the selection |
611 | 611 | var newE = e.firstChild; |
612 | | - for ( var i = 0; i < range.startOffset - 1 && newE; i++ ) { |
| 612 | + for ( var i = 0; i < selection.startOffset - 1 && newE; i++ ) { |
| 613 | + console.log( i ); |
613 | 614 | newE = newE.nextSibling; |
614 | 615 | } |
615 | 616 | while ( newE && newE.lastChild ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -7089,7 +7089,8 @@ |
7090 | 7090 | // (usually inside the <body> between two <br>s). Go to the rightmost |
7091 | 7091 | // child of the node just before the selection |
7092 | 7092 | var newE = e.firstChild; |
7093 | | - for ( var i = 0; i < range.startOffset - 1 && newE; i++ ) { |
| 7093 | + for ( var i = 0; i < selection.startOffset - 1 && newE; i++ ) { |
| 7094 | + console.log( i ); |
7094 | 7095 | newE = newE.nextSibling; |
7095 | 7096 | } |
7096 | 7097 | while ( newE && newE.lastChild ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -464,7 +464,7 @@ |
465 | 465 | var topBound=html.scrollTop()>body.scrollTop()?html.scrollTop():body.scrollTop(),bottomBound=topBound+context.$iframe.height();if(force||y<topBound||y>bottomBound){html.scrollTop(y);body.scrollTop(y);} |
466 | 466 | $element.trigger('scrollToTop');},'beforeSelection':function(selector,strict){if(typeof selector=='undefined'){selector='*';} |
467 | 467 | var e;if(context.$iframe[0].contentWindow.getSelection){var selection=context.$iframe[0].contentWindow.getSelection();if(selection.baseNode!==null){e=selection.getRangeAt(0).startContainer;}else{return $([]);}}else if(context.$iframe[0].contentWindow.document.selection){return $([]);} |
468 | | -if(e.nodeName!='#text'){var newE=e.firstChild;for(var i=0;i<range.startOffset-1&&newE;i++){newE=newE.nextSibling;} |
| 468 | +if(e.nodeName!='#text'){var newE=e.firstChild;for(var i=0;i<selection.startOffset-1&&newE;i++){console.log(i);newE=newE.nextSibling;} |
469 | 469 | while(newE&&newE.lastChild){newE=newE.lastChild;} |
470 | 470 | e=newE;} |
471 | 471 | while(e){if($(e).is(selector)&&!strict) |