Skip to content

Commit

Permalink
Do not try to disable Grammarly in Slate (#4650)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
e1himself authored Nov 9, 2021
1 parent 9874ed7 commit b664313
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-lobsters-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'slate-react': patch
---

Do not disable Grammarly extension in Slate editors
4 changes: 0 additions & 4 deletions packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,6 @@ export const Editable = (props: EditableProps) => {
<ReadOnlyContext.Provider value={readOnly}>
<DecorateContext.Provider value={decorate}>
<Component
// COMPAT: The Grammarly Chrome extension works by changing the DOM
// out from under `contenteditable` elements, which leads to weird
// behaviors so we have to disable it like editor. (2017/04/24)
data-gramm={false}
role={readOnly ? undefined : 'textbox'}
{...attributes}
// COMPAT: Certain browsers don't support the `beforeinput` event, so we'd
Expand Down

0 comments on commit b664313

Please sign in to comment.