mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-29 11:13:16 +02:00
fix: remove this on onKeyDownHandler
This commit is contained in:
@ -31,7 +31,7 @@ const Modal = ({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.addEventListener('keydown', onKeyDownHandler);
|
window.addEventListener('keydown', onKeyDownHandler);
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('keydown', this.onKeyDownHandler.bind(this));
|
window.removeEventListener('keydown', onKeyDownHandler.bind(this));
|
||||||
if (focusGrabberRef.current) {
|
if (focusGrabberRef.current) {
|
||||||
focusGrabberRef.current.remove();
|
focusGrabberRef.current.remove();
|
||||||
focusGrabberRef.current = null;
|
focusGrabberRef.current = null;
|
||||||
|
Reference in New Issue
Block a user