From eafda3cebc19970f7bdc81dccdfddecf056a8a83 Mon Sep 17 00:00:00 2001 From: joaompfp Date: Sat, 2 May 2026 17:30:01 +0100 Subject: [PATCH] =?UTF-8?q?fix(ui):=20model=20dropdown=20invisible=20on=20?= =?UTF-8?q?mobile=20=E2=80=94=20anchor=20fallback=20to=20mobile=20action?= =?UTF-8?q?=20when=20desktop=20chip=20hidden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/ui.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/ui.js b/static/ui.js index db76d20f..953b3615 100644 --- a/static/ui.js +++ b/static/ui.js @@ -574,9 +574,10 @@ function _positionModelDropdown(){ const chip=$('composerModelChip'); const mobileAction=$('composerMobileModelAction'); const footer=document.querySelector('.composer-footer'); - if(!dd||!chip||!footer) return; + if(!dd||!footer) return; const panel=$('composerMobileConfigPanel'); - const anchor=(panel&&panel.classList.contains('open')&&mobileAction)?mobileAction:chip; + const anchor=(panel&&panel.classList.contains('open')&&mobileAction)?mobileAction:(chip&&chip.offsetParent?chip:mobileAction); + if(!anchor) return; const chipRect=anchor.getBoundingClientRect(); const footerRect=footer.getBoundingClientRect(); let left=chipRect.left-footerRect.left;