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}>
<ul
{...leftProps}
id={'sub-panel'}
data-ytmd-sub-panel={true}
ref={setPanel}
class={panelStyle()}
style={{

View File

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