From a373931ebe6df80206c0ce5b3ad763cb3679206e Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Sun, 26 Nov 2017 20:34:45 -0800 Subject: [PATCH] Disable browser spellchecking with code --- app/components/Editor/components/Code.js | 2 +- app/components/Editor/components/InlineCode.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/Editor/components/Code.js b/app/components/Editor/components/Code.js index 52fa03671..99cef6ba6 100644 --- a/app/components/Editor/components/Code.js +++ b/app/components/Editor/components/Code.js @@ -9,7 +9,7 @@ export default function Code({ children, node, readOnly, attributes }: Props) { const language = node.data.get('language') || 'javascript'; return ( - + {readOnly && }
         {children}
diff --git a/app/components/Editor/components/InlineCode.js b/app/components/Editor/components/InlineCode.js
index f81bcf70a..1e87d286a 100644
--- a/app/components/Editor/components/InlineCode.js
+++ b/app/components/Editor/components/InlineCode.js
@@ -2,7 +2,9 @@
 import styled from 'styled-components';
 import { color } from 'shared/styles/constants';
 
-const InlineCode = styled.code`
+const InlineCode = styled.code.attrs({
+  spellCheck: false,
+})`
   padding: 0.25em;
   background: ${color.smoke};
   border-radius: 4px;