M
M
maxemga2021-06-08 21:26:51
React
maxemga, 2021-06-08 21:26:51

How to execute a script when clicking on a non-modal window?

I am writing an application and I need a modal window to appear when I click on Input (or some other block), and then I just do onFocus or onClick and change the variable to true so that the window appears, this is understandable, but how to change the variable to false when I click on some other area (that is, I have a modal window open and if I click somewhere else, the script is executed).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2021-06-08
@Kozack

Several options are described here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question