Changeset 12522
- Timestamp:
- 01/16/2020 06:56:32 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/js/mentions.js
r12516 r12522 88 88 */ 89 89 before_reposition: function( offset ) { 90 // get the iframe, if any, already applied with atwho 90 // get the iframe, if any, already applied with atwho. 91 91 var caret, 92 92 line, … … 110 110 } 111 111 112 // If the caret is past horizontal half, then flip it, yo 112 // If the caret is past horizontal half, then flip it, yo. 113 113 if ( caret.left > ( $body.width() / 2 ) ) { 114 114 $view.addClass( 'right' ); … … 119 119 } 120 120 121 // If we're on a small screen, scroll to caret 121 // If we're on a small screen, scroll to caret. 122 122 if ( $body.width() <= 400 ) { 123 123 $( document ).scrollTop( caret.top - 6 ); 124 124 } 125 125 126 // New position is under the caret (never above) and positioned to follow 127 // Dynamic sizing based on the input area (remove 'px' from end) 126 // New position is under the caret (never above) and positioned to follow. 127 // Dynamic sizing based on the input area (remove 'px' from end). 128 128 line = parseInt( this.$inputor.css( 'line-height' ).substr( 0, this.$inputor.css( 'line-height' ).length - 2 ), 10 ); 129 if ( !line || line < 5 ) { // sanity check, and catch no line-height 129 if ( !line || line < 5 ) { // sanity check, and catch no line-height. 130 130 line = 19; 131 131 } … … 139 139 * 140 140 * @param {unknown} $inputor Element which we're inserting content into. 141 * @param {string )content The content that will be inserted.142 * @param {string )suffix Applied to the end of the content string.141 * @param {string} content The content that will be inserted. 142 * @param {string} suffix Applied to the end of the content string. 143 143 * @return {string} 144 144 * @since 2.1.0
Note: See TracChangeset
for help on using the changeset viewer.