fix(ui): model dropdown invisible on mobile — anchor fallback to mobile action when desktop chip hidden
This commit is contained in:
parent
22fce2fda1
commit
eafda3cebc
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue