hotfix: in-app-menu position issue

This commit is contained in:
JellyBrick
2024-02-18 21:35:19 +09:00
parent b6fe2afd75
commit 87acf4cf04
2 changed files with 4 additions and 4 deletions

View File

@ -132,7 +132,7 @@ export const Panel = (props: PanelProps) => {
<Show when={local.open}> <Show when={local.open}>
<ul <ul
{...leftProps} {...leftProps}
id={'sub-panel'} data-ytmd-sub-panel={true}
ref={setPanel} ref={setPanel}
class={panelStyle()} class={panelStyle()}
style={{ style={{

View File

@ -250,8 +250,8 @@ export const TitleBar = (props: TitleBarProps) => {
if ( if (
e.target instanceof HTMLElement && e.target instanceof HTMLElement &&
!( !(
e.target.closest('#main-panel') || e.target.closest('nav[data-ytmd-main-panel]') ||
e.target.closest('#sub-panel') e.target.closest('ul[data-ytmd-sub-panel]')
) )
) { ) {
setOpenTarget(null); setOpenTarget(null);
@ -266,7 +266,7 @@ export const TitleBar = (props: TitleBarProps) => {
}); });
return ( return (
<nav id={'main-panel'} class={titleStyle()} data-macos={props.isMacOS}> <nav data-ytmd-main-panel={true} class={titleStyle()} data-macos={props.isMacOS}>
<IconButton <IconButton
onClick={() => setCollapsed(!collapsed())} onClick={() => setCollapsed(!collapsed())}
style={{ style={{