fix(ui): model dropdown invisible on mobile — anchor fallback to mobile action when desktop chip hidden
This commit is contained in:
1 parent
22fce2fda1
commit
eafda3cebc
1 file changed
+3
-2
+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