Skip to content

Commit 0a2862c

Browse files
authored
Merge pull request #445 from AllenInstitute/bugfix/ghost-tooltip-autofocus
(Tiny) Prevent autofocused tooltip
2 parents a0b3933 + 7b22330 commit 0a2862c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/core/App.module.css

+7
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,10 @@
9191
/* flex child */
9292
flex: 0 0 var(--file-details-width);
9393
}
94+
95+
.hidden {
96+
/* arbitrarily large to move input off-screen */
97+
left: -100;
98+
top: -100;
99+
position: absolute;
100+
}

packages/core/App.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export default function App(props: AppProps) {
104104
})}
105105
ref={measuredNodeRef}
106106
>
107+
{/* hidden input to capture autofocus on mount */}
108+
<input className={styles.hidden} autoFocus />
107109
<div className={styles.coreAndFileDetails}>
108110
<div className={styles.querySidebarAndCenter}>
109111
<QuerySidebar className={styles.querySidebar} />

0 commit comments

Comments
 (0)