Ticket #8206: 8206.patch
File 8206.patch, 1.3 KB (added by , 5 years ago) |
---|
-
src/bp-activity/js/mentions.js
109 109 caret = this.$inputor.caret( 'offset' ); 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' ); 115 115 move = caret.left - offset.left - this.view.$el.width(); … … 118 118 move = caret.left - offset.left + 1; 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 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) 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 } 132 132