diff options
| author | 2022-06-30 01:32:45 +0400 | |
|---|---|---|
| committer | 2022-06-30 00:32:45 +0300 | |
| commit | 9d224c252fdb2377512acc26747613660adde20f (patch) | |
| tree | bfbe217c42848f30777498cfc7ec6ccfc094aecb /src | |
| parent | Merge 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 '')
| -rw-r--r-- | src/components/InputTypes/Code.tsx | 4 | 
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]} />;  } | 
