mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-26 17:52:54 +02:00
fix: remove this on onKeyDownHandler
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user