mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-01 06:00:36 +00:00
fix(ui): avoid layout shifts in overflow-menu and repo filter (#37818)
Eliminate two layout shifts in the menu, one related to non-existant label on page load and one to `0` value rendering. Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
@@ -213,6 +213,7 @@ window.customElements.define('overflow-menu', class extends HTMLElement {
|
||||
if (newWidth !== this.lastWidth) {
|
||||
requestAnimationFrame(() => {
|
||||
this.updateItems();
|
||||
this.setAttribute('data-ready', ''); // reveal via CSS [data-ready]
|
||||
});
|
||||
this.lastWidth = newWidth;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user