fix(docsearch): capture mousedown event to close modal
This doesn't close the modal when selecting the input text and finishing the selection outside of the modal. See https://github.com/facebook/react-native-website/pull/2139#issuecomment-678330203
This commit is contained in:
parent
1a0cbbfdbf
commit
f9247b9cae
1 changed files with 1 additions and 1 deletions
|
|
@ -342,7 +342,7 @@ export function DocSearchModal({
|
|||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={(event) => {
|
||||
onMouseDown={(event) => {
|
||||
if (event.target === event.currentTarget) {
|
||||
onClose();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue