draft js editor scrolling issue with new line

35 Views Asked by At

The issue is when I press enter, it starts typing on a new line that is initially hidden. However, once I type 2 characters, it suddenly jumps down, making the text visible again.

Here is my lib details:

"draft-js": "^0.11.7",
"react-draft-wysiwyg": "^1.15.0",
1

There are 1 best solutions below

0
Thiwanka Wickramage On

After many struggles, I finally found a solution with CSS by overriding the 'DraftEditor-editorContainer' class.

.DraftEditor-editorContainer {
  height: 200px; // my text editor height
  overflow: auto;
  padding: 0px 14px;
}

you can see the result here.

enter image description here