溢出:隐藏似乎破坏了文件池

Overflow: hidden seems to break filepond

我正在尝试让 Filepond 工作,但我的 CSS 中的这一行似乎破坏了它 - overflow: hidden; 在 ul 选择器中。

我尝试对页面的整个部分进行核对,直到 Filepond 工作,将注意力集中在 css,最后是 ul {} 中的上述行。我可以清除其他所有内容,只留下那条线,而 Filepond 仍然损坏,所以我确定这是某种问题,但我不知道如何解决。

我尝试使用 Chrome 的检查器功能查看 运行 时间的页面源代码,但在那里找不到溢出。

然后我用Notepad++的文件搜索功能在Filepond文件中彻底搜索了"overflow",但是没有找到它与ul结合使用。我能得到的最接近的是 JS 文件中的 const 命名列表。不知何故,我认为这不相关,但我不知道为什么。如果需要,将在此处添加代码。

有趣的是,溢出在变更日志中出现了几次,一次说它修复了 "problem where list overflow would not render correctly." (v 2.2.1)

Chrome v73(最新) Filepond 最后更新时间:2019 年 4 月 15 日

filepond_problem.html

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Filepond Problem</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="problem.css"> <!--remove this line and it works-->
    <link rel="stylesheet" type="text/css" href="filepond/dist/filepond.css">
    <script src="filepond/dist/filepond.js"></script>
</head>

<body>
<input type="file" mutliple/>
<script>
    // Get a reference to the file input element
    const inputElement = document.querySelector('input[type="file"]');
    // Create the FilePond instance
    const pond = FilePond.create(inputElement);
</script>
</body>
</html>

problem.css(在我伙伴的一个小文件中)

ul {
    overflow: hidden;
}

当我选择要上传的文件时,无论是 drag/dropping,还是使用浏览对话框,它所做的只是删除 "drag & drop your files or browse." 它不显示我的文件,没有 x 来删除它, 没有什么。它只是变成了一个空的浅灰色框。

当您删除包含 problem.css 的行时,它的作用与 their site 中的描述相同。嗯,减去缩略图,但这是预料之中的,因为我还没有启用它。

输入位于 .filepond--drop-label,根据附加到它的样式,当您上传文件时,javascript 会隐藏它。同样的javascript大概显示的是照片,在下一个div,.firepond--list-scroller。照片和内容确实出现在列表中,所有图标也是如此,所以现在它们是隐藏的。你说你接下来会做照片部分,好吧,在这种情况下你只需要一起做,因为它们有不同的部分相互影响。

查看他们的 ul .filepond--list,我没有看到您所做的 ul{overflow:hidden;}(上传照片之前和之后)。所以我不确定这是从哪里来的,它可能是你在不知不觉中添加的。不需要那行代码。