Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

[Closed] Error with Comment Form if User has the Grammarly Browser Extension Enabled  

  RSS

mrhappywork
(@mrhappywork)
New Member
Joined: 2 years ago
Posts: 1
08/09/2018 8:45 am  

Hello. I am running into an issue with the comment form not playing nicely with the Grammarly add-on extensions for Firefox and Chrome. Here is what happens when a user has the Grammarly add-on enabled.

1. If a user clicks the comment box, but before typing anything in the box, clicks outside of the comment box, the box gets a red highlight around it.

2. Once this happens, the user is unable to use the comment box as normal. If clicking back in the box, the typing cursor will not appear, and if the user enters text, it actually enters it in white (invisible) font. If you highlight the box, you can see it. If you try to submit the comment in this state, the form gives an error saying “Please fill out this field” (pointing to the comment box)

3. The only workaround I know is to refresh the page and avoid clicking outside the comment box once you click in it. (or else the error in #1 and #2 happens again).

4. I noticed if I disable the Grammarly add-on, everything works as normal.

Is this a known issue? Is there some setting or another workaround that can allow users with Grammarly add on to not run into this error?

Please see attached screenshots.

WPDiscuz issue2
WPDiscuz issue

Nesty Dev liked
Topic Tags
Astghik
(@astghik)
Support Team Admin
Joined: 3 years ago
Posts: 4338
12/09/2018 6:29 pm  

Hi mrhappywork,

Thank you for letting us know.

We'll take it into consideration for future releases.


Nesty Dev
(@nesty-dev)
Active Member
Joined: 2 years ago
Posts: 10
13/10/2018 12:43 pm  

Hi guys.

I just want to say that I'm having the same issue so that the support team gives it a higher priority.

I hope that they fix it in the next update.

And thanks for this great plugin. 


Nesty Dev
(@nesty-dev)
Active Member
Joined: 2 years ago
Posts: 10
13/10/2018 1:03 pm  

[Update

I have noted that the issue happens in Microsoft Edge browser too.


Nesty Dev
(@nesty-dev)
Active Member
Joined: 2 years ago
Posts: 10
19/10/2018 4:42 pm  

[Update]

@mrhappywork

@Astghik

I have been trying to solve the problem for some time.

Currently, I guess the problem is that the comment focus jQuery delegate inside the wp_discuz.js file, isn't firing if the Grammarly extension is active, since clicking on the comment form results in the click registered on the Grammarly temp form, not on the wpDiscuz comment form.

So I think there should be another delegate the registers for the Grammarly temp form in case it exists,  the problem here is though, that the temp form won't be created until the user clicks on the comment form, so maybe we should register the delegate there?

var grammarly=$("grammarlyghost");

if(grammarly!==null&&grammarly!==undefined){
var child_div=$("grammarlyghost div:first");

child_div=$("grammarlyghost").children(":first");

if(child_div!==null&&child_div!==undefined){

vardiv_id=child_div.attr('class');
$(document).delegate('.'+div_id,'focus',function(){
varparent=$(this).parents('.wc-form-wrapper');

$('.commentTextMaxLength',parent).show();

$('.wc-form-footer',parent).slideDown(enableDropAnimation);

});

Nesty Dev
(@nesty-dev)
Active Member
Joined: 2 years ago
Posts: 10
19/10/2018 4:47 pm  

[Update]

@mrhappywork

@Astghik

I have been trying to solve the problem for some time.

Currently, I guess the problem is that the comment focus jQuery delegate (event handler) inside the wp_discuz.js file, isn't firing if the Grammarly extension is active, since clicking on the comment form results in the click registered on the Grammarly temp form, not on the wpDiscuz comment form.

So I think there should be another delegate the registers for the Grammarly temp form in case it exists,  the problem here is though, that the temp form won't be created until the user clicks on the comment form, so maybe we should register the delegate there?

Here's a piece of code I have tried, grammarlyghost is the name of the tag for the temp form parent, the temp form is a div, so what I'm trying to do is add an event handler on focus for that div, but the issue is that the div_id variable returns undefined, any help would be appreciated.

var grammarly = $("grammarlyghost");

if(grammarly !==null && grammarly !== undefined){
var child_div = $("grammarlyghost div:first");

child_div = $("grammarlyghost").children(":first");
if(child_div !== null && child_div !== undefined){

var div_id = child_div.attr('class');
$(document).delegate('.'+div_id,'focus',function(){
var parent=$(this).parents('.wc-form-wrapper');
$('.commentTextMaxLength',parent).show();
$('.wc-form-footer',parent).slideDown(enableDropAnimation);
});

}
This post was modified 2 years ago 2 times by Nesty Dev

Tom
 Tom
(@tomson)
Support Team Admin
Joined: 5 years ago
Posts: 3245
20/10/2018 12:38 pm  

I'm sorry but we have no any suggestion here. The only thing I can suggest is removing the avatar from textarea using a simple CSS code. Please put it in Dashboard > Comments > Settings > Stylings > Custom CSS Code textarea. Save it, delete all caches and press Ctrl+F5 on website front-end:

#wpcomm .wc_comm_form.wc_main_comm_form .wc-field-comment .wc-field-avatararea {
      visibility: hidden; width: 0px; height: 0px;
}
#wpcomm .wc_comm_form.wc_main_comm_form .wc-field-textarea .wpdiscuz-textarea-wrap textarea {
      padding: 25px 25px 0px 25px!important;
}

I'm closing this topic here. If we got some solution I'll update.

Thank you for helping to find a solution.


Nesty Dev liked
Share: