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

Closed
IIIEII opened this issue Jun 28, 2019 · 1 comment · Fixed by #14668
Closed

disableHeartBeatTimer doesn't really removes event listeners #14586

IIIEII opened this issue Jun 28, 2019 · 1 comment · Fixed by #14668
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@IIIEII
Copy link

IIIEII 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 For errors / faults / flaws / inconsistencies etc. label Jun 28, 2019
@tsteur
Copy link
Member

tsteur commented Jun 28, 2019

Thanks, that should be an easy fix.

@tsteur tsteur added this to the 3.12.0 milestone Jun 28, 2019
@tsteur tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Jun 28, 2019
@tsteur tsteur self-assigned this Jul 18, 2019
@mattab mattab modified the milestones: 3.13.0, 3.12.0 Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants