Skip to content

Commit 87acf4c

Browse files
committed
hotfix: in-app-menu position issue
1 parent b6fe2af commit 87acf4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/plugins/in-app-menu/renderer/Panel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const Panel = (props: PanelProps) => {
132132
<Show when={local.open}>
133133
<ul
134134
{...leftProps}
135-
id={'sub-panel'}
135+
data-ytmd-sub-panel={true}
136136
ref={setPanel}
137137
class={panelStyle()}
138138
style={{

src/plugins/in-app-menu/renderer/TitleBar.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ export const TitleBar = (props: TitleBarProps) => {
250250
if (
251251
e.target instanceof HTMLElement &&
252252
!(
253-
e.target.closest('#main-panel') ||
254-
e.target.closest('#sub-panel')
253+
e.target.closest('nav[data-ytmd-main-panel]') ||
254+
e.target.closest('ul[data-ytmd-sub-panel]')
255255
)
256256
) {
257257
setOpenTarget(null);
@@ -266,7 +266,7 @@ export const TitleBar = (props: TitleBarProps) => {
266266
});
267267

268268
return (
269-
<nav id={'main-panel'} class={titleStyle()} data-macos={props.isMacOS}>
269+
<nav data-ytmd-main-panel={true} class={titleStyle()} data-macos={props.isMacOS}>
270270
<IconButton
271271
onClick={() => setCollapsed(!collapsed())}
272272
style={{

0 commit comments

Comments
 (0)