Commit a75a7b8d authored by Filip Šenk's avatar Filip Šenk Committed by Marek Veselý
Browse files

Fix: Text areas height grows with more text

parent bfd4131d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@ const label = css`
`

const textArea = css`
  resize: none;
  resize: none !important;
  min-height: 7rem;
`
const highlight = (correct: boolean) => css`
  border-bottom: 0.2rem solid ${correct ? Colors.GREEN5 : Colors.RED5};
@@ -53,7 +54,7 @@ const AutoFreeFormQuestion: FC<QuestionProps> = ({
                ? event => onChange(event.currentTarget.value)
                : undefined
            }
            rows={5}
            autoResize
            className={cx(textArea, {
              [highlight(answer === details.correctAnswer)]:
                !!answer && inInstructor,
+3 −2
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@ const label = css`
`

const textArea = css`
  resize: none;
  resize: none !important;
  min-height: 7rem;
`
const FreeFormQuestion: FC<QuestionProps> = ({
  type,
@@ -40,6 +41,7 @@ const FreeFormQuestion: FC<QuestionProps> = ({
        />
        {multiline ? (
          <TextArea
            autoResize
            intent={error ? 'danger' : 'none'}
            readOnly={disabled}
            fill
@@ -49,7 +51,6 @@ const FreeFormQuestion: FC<QuestionProps> = ({
                ? event => onChange(event.currentTarget.value)
                : undefined
            }
            rows={5}
            className={textArea}
          />
        ) : (