Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-gramm not actually disabling Grammarly #4124

Closed
koralarts opened this issue Mar 16, 2021 · 5 comments · Fixed by #4650
Closed

data-gramm not actually disabling Grammarly #4124

koralarts opened this issue Mar 16, 2021 · 5 comments · Fixed by #4650
Labels

Comments

@koralarts
Copy link

Description
The Grammarly extension is still enabled even though the data-gramm attribute is set to false.

Steps
To reproduce the behavior:

  1. Install the Grammarly extension
  2. Go to: https://www.slatejs.org/examples/richtext
  3. Notice the Grammarly extension enabled on the Editor

Expectation
The Grammarly extension should not be enabled in the Editor when the data-gramm attribute is set to false

Environment

  • Slate Version: v0.60+
  • Operating System: Mac / Windows
  • Browser: Chrome

Context
The issue seems to stem from the data-slate-editor attribute that's added. Having said attribute makes Grammarly ignore the data-gramm attribute.

This is a Codepen that simulates the issue outside of Slate but with the relevant attributes (https://codepen.io/koralarts/pen/MWbRRwM).

@ianstormtaylor
Copy link
Owner

Does the Grammarly extension being enabled still result in broken editing experience?

It sounds like they are purposely ignoring their own attribute.

@koralarts
Copy link
Author

The editing itself isn't broken but more of having the data-gramm attribute doesn't work in combination with data-slate-editor. So if you want to disable Grammarly which data-gramm="false" should do based on #733, it will still be enabled.

It does seem like Grammarly only looks for the existence data-gramm to determine whether or not to disable the extension but having data-slate-editor seem to negate that.

@ianstormtaylor
Copy link
Owner

I think the question to answer is whether editing is broken in any way (not just a quick pass). It sounds like Grammarly is purposely circumventing the attribute.

If editing is totally fine these days, we can remove the attribute by default. If not, we can escalate.

@e1himself
Copy link
Contributor

I think the question to answer is whether editing is broken in any way (not just a quick pass). It sounds like Grammarly is purposely circumventing the attribute.
If editing is totally fine these days, we can remove the attribute by default. If not, we can escalate.

Editing does work fine indeed. Thanks to how Grammarly team reworked the underlining logic: https://www.grammarly.com/blog/engineering/making-grammarly-feel-native-on-every-website/

But applying corrections from Grammarly doesn't seem to work at the moment: #4579.

e1himself added a commit to e1himself/slate that referenced this issue Nov 9, 2021
As the `data-gramm` attribute is no longer working actually. See ianstormtaylor#4124 

The Grammarly extension is not causing the DOM issues anymore, as they have reworked their highlighting logic: 
https://www.grammarly.com/blog/engineering/making-grammarly-feel-native-on-every-website/
@e1himself
Copy link
Contributor

Related issue: #733

dylans pushed a commit that referenced this issue Nov 9, 2021
* Do not try to disable Grammarly in Slate

As the `data-gramm` attribute is no longer working actually. See #4124 

The Grammarly extension is not causing the DOM issues anymore, as they have reworked their highlighting logic: 
https://www.grammarly.com/blog/engineering/making-grammarly-feel-native-on-every-website/

* Add changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants