Skip to content

removeEventListener bug #329

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

HooraOnline
Copy link

removeEventListener remove bug

removeEventListener remove bug
@HooraOnline HooraOnline requested a review from Kiarash-Z as a code owner July 5, 2022 12:33
@TheElegantCoding
Copy link

this error is happend to me in an app pls need a fix

@franfdezmorales
Copy link

Hey @Kiarash-Z, could you take a look into this? Thank you.

@@ -44,7 +44,7 @@ const Calendar = ({
};
calendarElement.current.addEventListener('keyup', handleKeyUp, false);
return () => {
calendarElement.current.removeEventListener('keyup', handleKeyUp, false);
calendarElement.current && calendarElement.current.removeEventListener('keyup', handleKeyUp, false);
};

Choose a reason for hiding this comment

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

Can't you save the current element in some constant. ??

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.

5 participants