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

remove deprecated mouse event handlers #304

Merged
merged 2 commits into from
Nov 19, 2019

Conversation

st-h
Copy link
Contributor

@st-h st-h commented Oct 26, 2019

fixes #302

@sbatson5
Copy link
Collaborator

Thanks for doing this! Can you update the branch so we can get the test suite passing?

@st-h
Copy link
Contributor Author

st-h commented Nov 19, 2019

merged in current master. looks good so far

@sbatson5 sbatson5 merged commit 5ad7d8d into adopted-ember-addons:master Nov 19, 2019
@st-h st-h mentioned this pull request Nov 27, 2019
4 tasks
@@ -58,6 +58,14 @@ export default Component.extend({
set(this, 'active', true);
});
set(this, 'pendingSet', pendingSet);
this.element.addEventListener('mouseenter', this._mouseEnter);
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure that this actually works? it looks like _mouseEnter() is called without a this reference, so const flash = get(this, 'flash'); would always return undefined 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I think you are right about this - looks like I forgot to add the action helper. However, I noticed doing so breaks the test (I think because they run on ember 3.8.3). So I used bind() to bind this to the functions to handle the events. Opened #315 to address this

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 this pull request may close these issues.

Using mouseLeave event handler methods in components has been deprecated
3 participants