diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:32:59 -0400 |
commit | 6dc1997577fab2c366781fd7048144935afa0012 (patch) | |
tree | 8918d28c7ab4342f0738985e37af1dfc42d0e93a /resources/src/jquery/jquery.textSelection.js | |
parent | 150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff) | |
parent | fa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff) |
Merge commit 'fa89acd'
# Conflicts:
# .gitignore
# extensions/ArchInterWiki.sql
Diffstat (limited to 'resources/src/jquery/jquery.textSelection.js')
-rw-r--r-- | resources/src/jquery/jquery.textSelection.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/resources/src/jquery/jquery.textSelection.js b/resources/src/jquery/jquery.textSelection.js index 51119305..b9016424 100644 --- a/resources/src/jquery/jquery.textSelection.js +++ b/resources/src/jquery/jquery.textSelection.js @@ -138,7 +138,7 @@ insertText = '', selTextArr = selText.split( '\n' ); for ( i = 0; i < selTextArr.length; i++ ) { - insertText += pre + selTextArr[i] + post; + insertText += pre + selTextArr[ i ] + post; if ( i !== selTextArr.length - 1 ) { insertText += '\n'; } @@ -160,7 +160,7 @@ context.fn.restoreCursorAndScrollTop(); } if ( options.selectionStart !== undefined ) { - $( this ).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); + $( this ).textSelection( 'setSelection', { start: options.selectionStart, end: options.selectionEnd } ); } selText = $( this ).textSelection( 'getSelection' ); @@ -203,7 +203,7 @@ $( this ).focus(); if ( options.selectionStart !== undefined ) { - $( this ).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); + $( this ).textSelection( 'setSelection', { start: options.selectionStart, end: options.selectionEnd } ); } selText = $( this ).textSelection( 'getSelection' ); @@ -411,7 +411,8 @@ * * Scroll a textarea to the current cursor position. You can set the cursor * position with setSelection() - * @param options boolean Whether to force a scroll even if the caret position + * + * @param {boolean} options Whether to force a scroll even if the caret position * is already visible. Defaults to false * * @fixme document the options parameters (function body suggests options.force is a boolean, not options itself) @@ -576,7 +577,7 @@ context.fn.restoreSelection(); needSave = true; } - retval = ( alternateFn && alternateFn[command] || fn[command] ).call( this, options ); + retval = ( alternateFn && alternateFn[ command ] || fn[ command ] ).call( this, options ); if ( hasWikiEditor && needSave ) { context.fn.saveSelection(); } |