diff --git a/src/front-end/js/book.js b/src/front-end/js/book.js index e188f9be..46bbacf3 100644 --- a/src/front-end/js/book.js +++ b/src/front-end/js/book.js @@ -540,6 +540,10 @@ aria-label="Show hidden lines">'; /* To allow the sidebar expansion animation, we first need to put back the display. */ if (!sidebarCheckbox.checked) { sidebar.style.display = ''; + // Workaround for Safari skipping the animation when changing + // `display` and a transform in the same event loop. This forces a + // reflow after updating the display. + sidebar.offsetHeight; } });