How to check if popup is already opened

Hello Joyce,

Thank you for you answer. And for making example and record the video.

Your package of boolean and name(or popup number) is great. I believed that still can be problem in this situation:

If i have oepened Popup Number 1 and from this popup i am opening another different Popup Number 2, when i will close Popup Number 2 it will reset openPopup variable, which mean after that you will be able again to open Popup Number 1 while he is already opened, just because variable openPopup was reseted from Popup Number 2.

But good news are that i just make some test with 2 popups and when you start interacting with opened Popup 1(click on Popup 1 button for opening Popup 2 or whatever), you are not interacting with page in background anymore and with this presing Enter will not open new Popup 1 instance. Which is good.

Before you click on opened popup you are still interacting with page in backgroun but now this will be solved with varaible till user click somewhere on popup, after that is not matter anymore.

Thank you very much

I also hope that for this problem will be also some solution because it is much more important for me and i believe for others in the future.