refactor: remove unnecessary reflow trigger in day detail panel
Some checks failed
CI / lint-and-test (push) Failing after 3s
Some checks failed
CI / lint-and-test (push) Failing after 3s
- Eliminated the forced reflow line in the `showAsBottomSheet` function to streamline the rendering process of the day detail panel. - This change enhances code clarity and maintains the intended functionality without impacting user experience.
This commit is contained in:
@@ -186,8 +186,6 @@ function showAsBottomSheet() {
|
|||||||
|
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
// Force reflow so WebView paints the "closed" state before we add --open
|
|
||||||
void panelEl.offsetHeight;
|
|
||||||
overlayEl.classList.add("day-detail-overlay--visible");
|
overlayEl.classList.add("day-detail-overlay--visible");
|
||||||
panelEl.classList.add("day-detail-panel--open");
|
panelEl.classList.add("day-detail-panel--open");
|
||||||
const closeBtn = panelEl.querySelector(".day-detail-close");
|
const closeBtn = panelEl.querySelector(".day-detail-close");
|
||||||
|
|||||||
Reference in New Issue
Block a user