microcmsio/react-hooks-use-modal

`close()` useCallback does not work with the button spacebar

yamanoku opened this issue · 1 comments

What's happen ?

The <button> element can be operated in the same way with the space key as well as the enter key.
But, the <button> element set in the useCallback close() does not respond to the space key.

Demo Video

Enter Key

Screen.Recording.2021-08-29.at.17.23.55.mov

Spacebar Key

Screen.Recording.2021-08-29.at.17.24.28.mov

@yamanoku
Maybe disable-scroll is the cause. (source)

When I open a modal and then give Hidden CSS Style to the modal, the spacebar doesn't respond to the button.