Skip to content

Commit ee8c7a9

Browse files
committed
Fix IE event listener issue
The scroll event listener was installed with `node.addEventListener` while removing it is done using the `removeEvent` Chart.js helper. That doesn't work on browsers that don't support the passive option so let's always use the `addEvent` and `removeEvent` Chart.js helpers instead (even if they are deprecated).
1 parent d6539ba commit ee8c7a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function watch(chart) {
101101
stub = parent[STUB_KEY] || (parent[STUB_KEY] = {});
102102
charts = stub.charts || (stub.charts = []);
103103
if (charts.length === 0) {
104-
parent.addEventListener('scroll', onScroll, {passive: true});
104+
helpers.addEvent(parent, 'scroll', onScroll);
105105
}
106106

107107
charts.push(chart);

0 commit comments

Comments
 (0)