dawidkopczyk / dash-editor-components

Simple Python Code Editor in Dash :scroll:
MIT License
43 stars 4 forks source link

Fixed height and scroll not working as expected. #5

Open elijose55 opened 4 years ago

elijose55 commented 4 years ago

The following code makes the textarea overflow incorrectly when you paste a long enough code in it.

import dash_editor_components
import dash
import dash_html_components as html

app = dash.Dash(__name__)

style = {
    "width": "1000px",
    "height": "742px",
    "overflow": "auto"
}

app.layout = html.Div([
    dash_editor_components.PythonEditor(
        id='input',
        style=style
    )
])

if __name__ == '__main__':
    app.run_server(debug=True)

The problem is that you cannot edit any text bellow the style defined height. You can view it by scrolling down and even select it, but you can`t edit it. And even the text above the defined height cannot be edited as if the following text is on top of it.

The following images try to ilustrate the problem as it is a bit difficult to describe it.

Image 1: Screenshot from 2020-03-28 18-24-46

Image 2: Screenshot from 2020-03-28 18-25-05

I tryed different style parameters to fix this behavior but nothing worked. The only thing I know is that the problem is with the height style property. Thank you.