aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-06-30 01:32:45 +0400
committerGravatar GitHub <[email protected]>2022-06-30 00:32:45 +0300
commit9d224c252fdb2377512acc26747613660adde20f (patch)
treebfbe217c42848f30777498cfc7ec6ccfc094aecb /src
parentMerge pull request #466 from python-discord/dependabot/npm_and_yarn/sentry/re... (diff)
Add Selectable Styles To Code Field (#469)
Adds the selectable CSS styles to the code field to fix a bug on safari that prevented users from clicking into it and writing. Thanks to Etzeitet & NoodleReaper for discovering this. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/components/InputTypes/Code.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/InputTypes/Code.tsx b/src/components/InputTypes/Code.tsx
index 7112782..b0eddcb 100644
--- a/src/components/InputTypes/Code.tsx
+++ b/src/components/InputTypes/Code.tsx
@@ -8,6 +8,8 @@ import { EditorState } from "@codemirror/state";
import { oneDark } from "@codemirror/theme-one-dark";
import { EditorView, ViewUpdate } from "@codemirror/view";
+import { selectable } from "../../commonStyles";
+
interface CodeProps {
handler: (newContent: string) => void,
questionId: string,
@@ -43,5 +45,5 @@ export default function Code(props: CodeProps): JSX.Element {
return () => view.destroy();
}, []);
- return <div id={`${props.questionId}-code`} css={styles} />;
+ return <div id={`${props.questionId}-code`} css={[styles, selectable]} />;
}