mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 11:10:18 +00:00
fix(ui): model dropdown invisible on mobile — anchor fallback to mobile action when desktop chip hidden
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user