I'm moving an element with translateY. Everything works fine under Chrome, Firefox, IE, old Edge except Safari (12.1.2 & 13.1.2) and GNOME Web (WebKit).
Under Safari the element "jumps". Here a small example (also available on CodePen):
.parent {
height: 50px;
background-color: blue;
padding: 10px;
}
.child {
background-color: yellow;
padding: 10px;
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.child.move {
transform: translateY(-150%);
padding: 0; /* If 10px: no bug */
}
<br><br><br>
<div class="parent">
<div class="child" onclick="this.classList.toggle('move')">Click me</div>
</div>
I could not find answers on the WebKit bug tracker.
Do you know some workarounds?
Other Stack Overflow related issues: