-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
No delay when transition duration is 0 #35982
Copy link
Copy link
Closed
Labels
C-untriagedNew issues that haven't been triaged yetNew issues that haven't been triaged yet
Description
Describe the bug:
No delay when transition duration is 0
To Reproduce:
Click first button, then second. There should be a delay of 2 seconds, then instantly jump to translateY(0).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button id="first">first step</button>
<button id="resetanimation">reset animation instantly with delay</button>
<div id="target" style="width: 100px; height: 100px; background-color: aqua;"></div>
<script>
var target = document.getElementById("target");
first.onclick = function() {
target.style.transform = "translateY(100px)";
target.style.transition = "transform 7s ease-out";
}
resetanimation.onclick = function() {
target.style.transform = "translateY(0)";
target.style.transition = "transform 0s ease-out 2s";
}
</script>
</body>
</html>Platform:
All
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-untriagedNew issues that haven't been triaged yetNew issues that haven't been triaged yet