Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 9 ), |
75 | | - array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 29 ), |
| 75 | + array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 30 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 179 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 52 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 54 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 371 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 372 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 371 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 372 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js |
— | — | @@ -313,7 +313,6 @@ |
314 | 314 | * character back and forth. |
315 | 315 | */ |
316 | 316 | var range = document.body.createTextRange(); |
317 | | - // store the current selection so we can reselect it later |
318 | 317 | var savedRange = document.selection.createRange(); |
319 | 318 | var pos = $(this).textSelection( 'getCaretPosition' ); |
320 | 319 | var oldScrollTop = this.scrollTop; |
— | — | @@ -327,8 +326,8 @@ |
328 | 327 | range.move( 'character', -1 ); |
329 | 328 | range.select(); |
330 | 329 | } |
| 330 | + savedRange.select(); |
331 | 331 | } |
332 | | - savedRange.select(); |
333 | 332 | $(this).trigger( 'scrollToPosition' ); |
334 | 333 | } ); |
335 | 334 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6480,7 +6480,6 @@ |
6481 | 6481 | * character back and forth. |
6482 | 6482 | */ |
6483 | 6483 | var range = document.body.createTextRange(); |
6484 | | - // store the current selection so we can reselect it later |
6485 | 6484 | var savedRange = document.selection.createRange(); |
6486 | 6485 | var pos = $(this).textSelection( 'getCaretPosition' ); |
6487 | 6486 | var oldScrollTop = this.scrollTop; |
— | — | @@ -6494,8 +6493,8 @@ |
6495 | 6494 | range.move( 'character', -1 ); |
6496 | 6495 | range.select(); |
6497 | 6496 | } |
| 6497 | + savedRange.select(); |
6498 | 6498 | } |
6499 | | - savedRange.select(); |
6500 | 6499 | $(this).trigger( 'scrollToPosition' ); |
6501 | 6500 | } ); |
6502 | 6501 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -438,8 +438,9 @@ |
439 | 439 | return($.os.name=='mac'?13:($.os.name=='linux'?15:16))*row;} |
440 | 440 | return this.each(function(){if($(this).is(':hidden')){}else if(this.selectionStart||this.selectionStart=='0'){var scroll=getCaretScrollPosition(this);if(options.force||scroll<$(this).scrollTop()||scroll>$(this).scrollTop()+$(this).height()) |
441 | 441 | $(this).scrollTop(scroll);}else if(document.selection&&document.selection.createRange){var range=document.body.createTextRange();var savedRange=document.selection.createRange();var pos=$(this).textSelection('getCaretPosition');var oldScrollTop=this.scrollTop;range.moveToElementText(this);range.collapse();range.move('character',pos+1);range.select();if(this.scrollTop!=oldScrollTop) |
442 | | -this.scrollTop+=range.offsetTop;else if(options.force){range.move('character',-1);range.select();}} |
443 | | -savedRange.select();$(this).trigger('scrollToPosition');});}};switch(command){case'encapsulateSelection':options=$.extend({'pre':'','peri':'','post':'','ownline':false,'replace':false},options);break;case'getCaretPosition':options=$.extend({'startAndEnd':false},options);break;case'setSelection':options=$.extend({'start':undefined,'end':undefined,'startContainer':undefined,'endContainer':undefined},options);if(options.end===undefined) |
| 442 | +this.scrollTop+=range.offsetTop;else if(options.force){range.move('character',-1);range.select();} |
| 443 | +savedRange.select();} |
| 444 | +$(this).trigger('scrollToPosition');});}};switch(command){case'encapsulateSelection':options=$.extend({'pre':'','peri':'','post':'','ownline':false,'replace':false},options);break;case'getCaretPosition':options=$.extend({'startAndEnd':false},options);break;case'setSelection':options=$.extend({'start':undefined,'end':undefined,'startContainer':undefined,'endContainer':undefined},options);if(options.end===undefined) |
444 | 445 | options.end=options.start;if(options.endContainer==undefined) |
445 | 446 | options.endContainer=options.startContainer;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;} |
446 | 447 | var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;var needSave=false;if(hasIframe&&context.savedSelection!==null){context.fn.restoreSelection();needSave=true;} |