mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 19:31:46 +00:00
Fix in-app-menu squishing sub-menu items
This commit is contained in:
@ -101,6 +101,15 @@ export const createPanel = (
|
||||
}
|
||||
|
||||
panel.setAttribute('open', 'true');
|
||||
|
||||
// Children are placed below their parent item, which can cause
|
||||
// long lists to squeeze their children at the bottom of the screen
|
||||
// (This needs to be done *after* setAttribute)
|
||||
panel.classList.remove('position-by-bottom');
|
||||
if (options.placement === 'right' && panel.scrollHeight > panel.clientHeight ) {
|
||||
panel.style.setProperty('--y', `${rect.y + rect.height}px`);
|
||||
panel.classList.add('position-by-bottom');
|
||||
}
|
||||
};
|
||||
|
||||
anchor.addEventListener('click', () => {
|
||||
|
||||
Reference in New Issue
Block a user