microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.28k stars 288 forks source link

vh height div displaying by Ipython expand infinitely #16053

Open Marchlak opened 1 week ago

Marchlak commented 1 week ago

Applies To

What happened?

Displaying in Div cells using IPython with a height style in vh units causes it to expand infinitely, eventually crashing the entire notebook.

from IPython.display import display, HTML

html_content = """
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Full Height Div</title>
    <style>
        #full-height-div {
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: lightgray;
            font-size: 24px;
            color: darkblue;
        }
    </style>
</head>
<body>
    <div id="full-height-div">
        This div is bugged sad :(
    </div>
</body>
</html>
"""

display(HTML(html_content))

VS Code Version

1.93.0

Jupyter Extension Version

v2024.8.1

Jupyter logs

No response

Coding Language and Runtime Version

Python, js

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local