Skip to content

[Bug]: can not download a file. when page to be close with alert #2993

@fr0zenrain

Description

@fr0zenrain

Version

1.55

Steps to reproduce

<html>
<body>
<!--StartFragment-->
<script>
(function () {
for (var i = 1; i <= 4; i++) {
var input = 'input_' + i;
input = document.createElement("input")
input.type = "hidden"
input.value = Math.random()
document.body.appendChild(input)
}
})()
document.body.addEventListener('click', function () {
 
alert(" ");
window.location.href = 'test.exe';
 
});
 
</script>

<!--EndFragment-->
</body>
</html>

Expected behavior

download file and the subsequent logic will be executed normally

Actual behavior

download is going on, but the subsequent logic code not works.

Additional context

GPT tell me, after "alert" page was freed , the expect_download bind on the page .so it not works. GPT tell me there is a context.expect_download. and it's not exists.

Environment

- Operating System: [Ubuntu 22.04]
- CPU: [amd64]
- Browser: [All, Chromium]
- Python Version: [3.12]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions