Skip to content

fix(material-experimental/mdc-slider): event handling fixes and cleanup #23063

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

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

crisbeto
Copy link
Member

  • Fixes that the mouseenter and mouseleave handlers on the slider were leaking. It was Function.bind returns a new function and we weren't passing the same function in when the component is destroyed.
  • Fixes that slider was calling unsubscribe on subjects that belong to the slider thumbs. Subject.unsubscribe will drop all subscriptions to the observable, including ones that come from the outside. The correct thing to do is to either complete the observables or save a reference to the Subscription and call unsubscribe on it.
  • Removes the *Ctor interfaces from the mixin class since it isn't necessary anymore.

* Fixes that the `mouseenter` and `mouseleave` handlers on the slider were leaking. It was `Function.bind` returns a new function and we weren't passing the same function in when the component is destroyed.
* Fixes that slider was calling `unsubscribe` on subjects that belong to the slider thumbs. `Subject.unsubscribe` will drop all subscriptions to the observable, including ones that come from the outside. The correct thing to do is to either complete the observables or save a reference to the `Subscription` and call `unsubscribe` on it.
* Removes the `*Ctor` interfaces from the mixin class since it isn't necessary anymore.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jun 24, 2021
@crisbeto crisbeto requested a review from wagnermaciel June 24, 2021 16:12
@crisbeto crisbeto requested a review from devversion as a code owner June 24, 2021 16:12
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 24, 2021
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 26, 2021
Copy link
Contributor

@wagnermaciel wagnermaciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amysorto amysorto merged commit 91fa44e into angular:master Jun 28, 2021
amysorto pushed a commit that referenced this pull request Jun 28, 2021
…up (#23063)

* Fixes that the `mouseenter` and `mouseleave` handlers on the slider were leaking. It was `Function.bind` returns a new function and we weren't passing the same function in when the component is destroyed.
* Fixes that slider was calling `unsubscribe` on subjects that belong to the slider thumbs. `Subject.unsubscribe` will drop all subscriptions to the observable, including ones that come from the outside. The correct thing to do is to either complete the observables or save a reference to the `Subscription` and call `unsubscribe` on it.
* Removes the `*Ctor` interfaces from the mixin class since it isn't necessary anymore.

(cherry picked from commit 91fa44e)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants