Notifications
Clear all

CSS Selector for reply to another comment for buddypress mentions

4 Posts
2 Users
0 Likes
963 Views
soopaman
(@soopaman)
Member Customer
Joined: 4 years ago
Posts: 2
Topic starter  

I am using buddypress w/ my wordpress installation. The mentions feature works in the normal comments w/ wpdisquz, but does not work in the reply. e.g. User 1 comments, user 2 replies to user 1's comment. 

There is a js code in buddypress which selects which forms/textareas the mention script targets. I have used this script successfully with the native wordpress comment system that I use on some sections of the site by adding "comments textarea" as the selector. 

For whatever reason I am unable to find the selector for the wpdisquz reply form/text area, so I can't get the @mentions script to pop up.

What is the correct CSS selector for the reply comment textarea/form?

I have tried the following CSS selectors, but none of them work:

#wpcomm .wc_comm_form.wc-secondary-form-wrapper .wc-field-textarea textarea,

.wc_comm_form.wc-secondary-form-wrapper .wc-field-textarea textarea,

.wc-secondary-form-wrapper .wc-field-textarea textarea,

.wc-field-textarea textarea,

textarea,

#wpcomm .wc-field-textarea .wpdiscuz-textarea-wrap textarea, .wc-field-textarea .wpdiscuz-textarea-wrap textarea,

.wpdiscuz-textarea-wrap textarea,

#wpcomm .wc-field-textarea textarea, .wc-field-textarea textarea,

#wpcomm *,

#wpcomm form div,

form div,

div, form,

.wc_comment,

wc_comment.wpd-field,

wpd-field,

#wpcomm .wc-field-textarea .wpdiscuz-textarea-wrap, .

wc-field-textarea .wpdiscuz-textarea-wrap,

.wpdiscuz-textarea-wrap


   
Quote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

Hi @soopaman,

Please put the following JS code in your current active theme JS files,  to get it resolved.


jQuery(document).delegate('.wc-reply-button', 'click', function () {
jQuery( '#comments form textarea' ).bp_mentions( bp.mentions.users );
});

Please don't forget to delete all caches and press CTRL+F5(twice) on the frontend before checking.


   
ReplyQuote
soopaman
(@soopaman)
Member Customer
Joined: 4 years ago
Posts: 2
Topic starter  

@elvina I followed your instructions and added the code to the bottom of my main theme scripts .min.js file and it does not work. All browser, cdn, cloudflare and page caches were cleared and the code addition is confirmed live on the site.


   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

@soopaman,

It seems there is a JS error, that may caused the issue.

Could you please check, have a JS error on the console?

To check it you just need to do right-click(or CTRL+F12) then Inspect element on the frontend page, then go to the console to find the JS error, if those exist.
In any case, please leave the example URL to allow us to check it.

 

 


   
ReplyQuote
Share:
Scroll to top