1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-06-26 01:32:43 +02:00

fix: remove this on onKeyDownHandler

This commit is contained in:
Arnab Sen
2022-03-12 11:17:24 +05:30
parent a78a686ef1
commit 4437069580

View File

@ -31,7 +31,7 @@ const Modal = ({
useEffect(() => {
window.addEventListener('keydown', onKeyDownHandler);
return () => {
window.removeEventListener('keydown', this.onKeyDownHandler.bind(this));
window.removeEventListener('keydown', onKeyDownHandler.bind(this));
if (focusGrabberRef.current) {
focusGrabberRef.current.remove();
focusGrabberRef.current = null;