Skip to:
Content

BuddyPress.org

Ticket #8206: 8206.patch

File 8206.patch, 1.3 KB (added by passoniate, 5 years ago)

Patch

  • src/bp-activity/js/mentions.js

     
    109109                                                caret = this.$inputor.caret( 'offset' );
    110110                                        }
    111111
    112                                         // If the caret is past horizontal half, then flip it, yo
     112                                        // If the caret is past horizontal half, then flip it, yo.
    113113                                        if ( caret.left > ( $body.width() / 2 ) ) {
    114114                                                $view.addClass( 'right' );
    115115                                                move = caret.left - offset.left - this.view.$el.width();
     
    118118                                                move = caret.left - offset.left + 1;
    119119                                        }
    120120
    121                                         // If we're on a small screen, scroll to caret
     121                                        // If we're on a small screen, scroll to caret.
    122122                                        if ( $body.width() <= 400 ) {
    123123                                                $( document ).scrollTop( caret.top - 6 );
    124124                                        }
    125125
    126126                                        // 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).
    128128                                        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.
    130130                                                line = 19;
    131131                                        }
    132132