Skip to content

Commit

Permalink
hotfix: in-app-menu position issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick committed Feb 18, 2024
1 parent b6fe2af commit 87acf4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/in-app-menu/renderer/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={{
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/in-app-menu/renderer/TitleBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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={{
Expand Down

0 comments on commit 87acf4c

Please sign in to comment.