Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Textarea in Question editor hides content at end of line #275

Closed
Rllyyy opened this issue Apr 24, 2023 · 0 comments
Closed

[BUG] Textarea in Question editor hides content at end of line #275

Rllyyy opened this issue Apr 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Rllyyy
Copy link
Owner

Rllyyy commented Apr 24, 2023

I think this problems is caused by material ui TextareaAutosize not handling other font sizes than 16px.

Solution:
Replace TextareaAutosize (Material UI) with react-textarea-autosize
This would also fix and issue described in #201 (MUI: Too many re-renders. The layout is unstable.TextareaAutosize limits the number of renders to prevent an infinite loop)

A different option would be to combine material ui TextField and TextareaAutosize. But i couldn't remove the glow on focus:

<TextField
  id={`modal-question-${labelTextLowerCase}-textarea`}
  multiline
  value={value || ""}
  name={labelTextLowerCase}
  onChange={handleChange}
  {...props}
  sx={{
    width: "100%"
  }}
  InputProps={{
    inputComponent: TextareaAutosize,
    inputProps: {
      style: {
        resize: "none",
        padding: "6px 10px",
        lineHeight: "1.4",
      },
    },
  }}
/>
@Rllyyy Rllyyy added the bug Something isn't working label Apr 24, 2023
@Rllyyy Rllyyy self-assigned this Apr 24, 2023
@Rllyyy Rllyyy closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant