Skip to content

The layer overflows the input box height after clicking the image. #1486

@angelofan

Description

@angelofan

Describe the bug
When click an image whose height is greater than the input box height, the selected prompt layer overflows the input box.

image

To Reproduce
Steps to reproduce the behavior:
Use this html code. Click on the image.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.jsdelivr.net/npm/suneditor@latest/dist/css/suneditor.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/suneditor@latest/dist/suneditor.min.js"></script>
</head>
<body>
    <textarea id="sample"><img src="http://suneditor.com/docs/cat1.jpg" /></textarea>
    <script>
        SUNEDITOR.create('sample', {
            width: '100%',
            height: 150,
            buttonList: [
                ['image']
            ],
        });
    </script>
</body>
</html>

Expected behavior
The overflow should be hidden instead of floating above the input box.

Screenshots
In my project:

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions