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

Wrong behaviour in Button view setter. #81

Closed
slavatroitsky opened this issue Jul 12, 2023 · 0 comments · Fixed by #82
Closed

Wrong behaviour in Button view setter. #81

slavatroitsky opened this issue Jul 12, 2023 · 0 comments · Fixed by #82

Comments

@slavatroitsky
Copy link

slavatroitsky commented Jul 12, 2023

Hey!
Please prove me wrong. If I set new view, I expect that events from old one will be disconnected. But in code I see that you are trying to disconnect events from new view I've just passed.
May be that should look like:
if (wasItInitiated) this.disconnectEvents(this._view);
Or
if (wasItInitiated) this.disconnectEvents(this.view);
Instead in code:
if (wasItInitiated) this.disconnectEvents(view);

https://github.com/pixijs/ui/blob/9de9052060bbe88cfa5b6bc5519701ac69814250/src/Button.ts#L53C43-L53C43

@CyberDex CyberDex changed the title Possible wrong behaviour in Button view setter. Wrong behaviour in Button view setter. Jul 14, 2023
@CyberDex CyberDex linked a pull request Jul 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant