Backed out changeset 5a2b98798636 (bug 1960926) for causing bc failures @ browser_customize_sidebar.js CLOSED TREE

This commit is contained in:
smolnar
2025-04-22 18:37:17 +03:00
parent c8171bddd1
commit 671d93ed3b

View File

@@ -1081,11 +1081,13 @@ var SidebarController = {
let fromRects = this._getRects(animatingElements);
// We need to wait for lit to re-render, and us to get the final width.
// This is a bit unfortunate but alas...
this.sidebarMain.requestUpdate();
await this.sidebarMain.updateComplete;
let toRects = this._getRects(animatingElements);
// We need to wait for rAF for lit to re-render, and us to get the final
// width. This is a bit unfortunate but alas...
let toRects = await new Promise(resolve => {
requestAnimationFrame(() => {
resolve(this._getRects(animatingElements));
});
});
const options = {
duration: document.documentElement.hasAttribute("sidebar-expand-on-hover")