Skip to content

Commit bacb815

Browse files
authored
Use capture mode with globalEventOff
Should fix #283
1 parent 6973b83 commit bacb815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class ReactTooltip extends React.Component {
217217
// Global event to hide tooltip
218218
if (globalEventOff) {
219219
window.removeEventListener(globalEventOff, this.hideTooltip)
220-
window.addEventListener(globalEventOff, this.hideTooltip, false)
220+
window.addEventListener(globalEventOff, this.hideTooltip, isCaptureMode)
221221
}
222222

223223
// Track removal of targetArray elements from DOM

0 commit comments

Comments
 (0)