File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -282,12 +282,13 @@ const Tooltip = ({
282
282
if ( ! show ) {
283
283
return
284
284
}
285
- const anchorById = document . querySelector < HTMLElement > ( `[id='${ anchorId } ']` )
286
- const anchors = [ anchorById , ...anchorsBySelect ]
287
- if ( anchors . some ( ( anchor ) => anchor ?. contains ( event . target as HTMLElement ) ) ) {
285
+ const target = event . target as HTMLElement
286
+ if ( tooltipRef . current ?. contains ( target ) ) {
288
287
return
289
288
}
290
- if ( tooltipRef . current ?. contains ( event . target as HTMLElement ) ) {
289
+ const anchorById = document . querySelector < HTMLElement > ( `[id='${ anchorId } ']` )
290
+ const anchors = [ anchorById , ...anchorsBySelect ]
291
+ if ( anchors . some ( ( anchor ) => anchor ?. contains ( target ) ) ) {
291
292
return
292
293
}
293
294
handleShow ( false )
You can’t perform that action at this time.
0 commit comments