Skip to content

Commit b7f04f7

Browse files
authored
fix: fix ie edge CustomEvent bug (ReactTooltip#567)
switches details to be included in the CustomEvent.initCustomEvent constructor fix ReactTooltip#498
1 parent 22c3bac commit b7f04f7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/decorators/staticMethods.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ const dispatchGlobalEvent = (eventName, opts) => {
1212
event = new window.CustomEvent(eventName, { detail: opts });
1313
} else {
1414
event = document.createEvent("Event");
15-
event.initEvent(eventName, false, true);
16-
event.detail = opts;
15+
event.initEvent(eventName, false, true, opts);
1716
}
1817

1918
window.dispatchEvent(event);

0 commit comments

Comments
 (0)