Skip to:
Content

BuddyPress.org

Opened 7 weeks ago

#9289 new defect (bug)

BP Mentions autosuggest popup positioning bug

Reported by: cjerrells's profile cjerrells Owned by:
Milestone: Awaiting Review Priority: low
Severity: normal Version: 14.3.2
Component: Activity Keywords:
Cc:

Description

Hi! This is my first time reporting an issue, so let me start by saying thank you for the phenomenal work on BuddyPress through the ages :)

I've found two possible bugs in bp-activity/js/mentions.js:

  1. The callback registration for "before reposition" is using the key "before_reposition" but in bp-core/js/vendor/jquery.atwho.js it's actually "beforeReposition". So as far as I can tell in my own testing, this function isn't being called. I believe it changed (7 years ago!) in revision 11795.
  1. Even with that fixed, the code doesn't seem to account for scrollable content boxes, resulting in the autosuggest popup appearing far down the page from where the user is typing if the body#tinymce is taller than its containing iframe.

This is happening for us in bbPress TinyMCE topic/reply boxes, where we're using the approach here to enable @-mention autosuggest in that context.

However, I have tested with vanilla WP/BP and could produce the same behaviour in a BP Nouveau message compose box (screenshot attached).

On our site we have fixed this by:

  1. Changing the key to "beforeReposition" so that the code block runs
  1. Adding the following at line 677 (just after the iframeOffset handling):

caret.top -= jQuery( atwhoDataValue.iframe ).contents().scrollTop();

Attachments (1)

Example of autosuggest positioning bug.jpg (183.4 KB) - added by cjerrells 7 weeks ago.
Example screenshot

Download all attachments as: .zip

Change History (1)

@cjerrells
7 weeks ago

Example screenshot

Note: See TracTickets for help on using tickets.