File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,14 +129,15 @@ function onMouseEnter(contributor: GitHubContributor) {
129129 if (! isExpandable (contributor )) return
130130 cancelClose ()
131131 clearTimeout (openTimer .value )
132+ openTimer .value = undefined
132133
133- const trigger = () => {
134+ const trigger = async () => {
134135 activeContributor .value = contributor
135- positionPopover (` anchor-${contributor .id } ` )
136+ await positionPopover (` anchor-${contributor .id } ` )
136137 }
137138
138139 if (activeContributor .value ) {
139- trigger ()
140+ void trigger ()
140141 } else {
141142 openTimer .value = setTimeout (trigger , 80 )
142143 }
@@ -151,12 +152,18 @@ function cancelClose() {
151152
152153function onMouseLeave() {
153154 clearTimeout (openTimer .value )
155+ openTimer .value = undefined
154156 closeTimer .value = setTimeout (() => {
155157 const popover = document .getElementById (' shared-contributor-popover' )
156158 if (popover && ! popover .matches (' :hover' )) {
157159 try {
158160 ;(popover as any ).hidePopover ()
159- } catch (e ) {}
161+ } catch (e ) {
162+ if (import .meta .dev ) {
163+ // oxlint-disable-next-line no-console
164+ console .warn (' [positionPopover] showPopover failed:' , e )
165+ }
166+ }
160167 activeContributor .value = null
161168 }
162169 }, 120 )
You can’t perform that action at this time.
0 commit comments