()
| 79 | }, [ref, state]); |
| 80 | |
| 81 | let onHoverStart = () => { |
| 82 | if (trigger === 'focus') { |
| 83 | return; |
| 84 | } |
| 85 | // In chrome, if you hover a trigger, then another element obscures it, due to keyboard |
| 86 | // interactions for example, hover will end. When hover is restored after that element disappears, |
| 87 | // focus moves on for example, then the tooltip will reopen. We check the modality to know if the hover |
| 88 | // is the result of moving the mouse. |
| 89 | if (getInteractionModality() === 'pointer') { |
| 90 | isHovered.current = true; |
| 91 | } else { |
| 92 | isHovered.current = false; |
| 93 | } |
| 94 | handleShow(); |
| 95 | }; |
| 96 | |
| 97 | let onHoverEnd = () => { |
| 98 | if (trigger === 'focus') { |
nothing calls this directly
no test coverage detected