Open
Description
"the results could not be loaded" error condition is correctly generated for errors like 404, 500, but not for timeout condition
Minimal case:
Browse to http://localhost/select.html
Expected: After 1000 ms, "the results could not be loaded" is displayed right below dropdown
Actual: No error is displayed
sleep.php:
<?php
sleep (20);
select.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="select2.css" rel="stylesheet">
</head>
<body>
<select id="dropdown"></select>
<script src="jquery-3.7.1.js"></script>
<script src="select2.full.js"></script>
<script>
$(function(){
$('#dropdown').select2({
debug:true,
ajax: {
url: '/sleep.php',
timeout: 1000,
error: function(a,b,c) {
console.log("oops");
},
data: function (params) {
return {
query: params.term
}
},
},
width: "50%"
})
});
</script>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels