Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disableHeartBeatTimer doesn't really removes event listeners #14586

IIIEII opened this issue Jun 28, 2019 · 1 comment


Copy link

commented Jun 28, 2019

In piwik.js:
setUpHeartBeat() attaches to 'focus' and 'blur' window events without capture:

addEventListener(windowAlias, 'focus', heartBeatOnFocus);
addEventListener(windowAlias, 'blur', heartBeatOnBlur);

But disableHeartBeatTimer() removes those events with capture (third parameter):

windowAlias.removeEventListener('focus', heartBeatOnFocus, true);
windowAlias.removeEventListener('blur', heartBeatOnBlur, true);

So event listeners are not really removed and script continue to send ping requests.

@tsteur tsteur added the Bug label Jun 28, 2019


This comment has been minimized.

Copy link

commented Jun 28, 2019

Thanks, that should be an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.