Skip to content

Commit c7f865f

Browse files
docs: add issue with closeEvents to troubleshooting
1 parent 613e0e0 commit c7f865f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: docs/docs/troubleshooting.mdx

+18
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,24 @@ or
8282
}
8383
```
8484

85+
### The tooltip doesn't close when using `closeEvents={{ click: true }}`
86+
87+
Some HTML elements, such as the `<svg>`, can sometimes capture click events and not propagate them. If your anchor element contains an `<svg>` element, try setting `pointer-events: none;` on it.
88+
89+
```jsx
90+
<button data-tooltip-id="...">
91+
<svg className="my-svg">
92+
...
93+
</svg>
94+
</button>
95+
```
96+
97+
```css
98+
.my-svg {
99+
pointer-events: none;
100+
}
101+
```
102+
85103
## The border doesn't show for the arrow
86104

87105
Simply setting the border for the tooltip through CSS will not work for the arrow.

0 commit comments

Comments
 (0)